Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 664214

Summary: app-text/getxbook-1.2 : getgbook.c:46:35: error: %s directive output may be truncated writing up to 1023 bytes into a region of size 1014 [-Werror=format-truncation=]
Product: Gentoo Linux Reporter: Toralf Förster <toralf>
Component: Current packagesAssignee: Andrey Grozin <grozin>
Status: CONFIRMED ---    
Severity: normal CC: kermitthefrog, matt
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: emerge-info.txt
app-text:getxbook-1.2:20180821-185837.log
emerge-history.txt
environment
etc.portage.tbz2
temp.tbz2
getxbook error log

Description Toralf Förster gentoo-dev 2018-08-21 19:21:29 UTC
x86_64-pc-linux-gnu-gcc -c -O2 -pipe -march=native -std=c99 -pedantic -Wall -Wextra -Werror -g -D_POSIX_C_SOURCE=200112L -DVERSION=\"1.2\" getgbook.c
getgbook.c: In function ‘getpagelist’:
getgbook.c:46:35: error: ‘%s’ directive output may be truncated writing up to 1023 bytes into a region of size 1014 [-Werror=format-truncation=]
  snprintf(url, URLMAX, "/books?id=%s&printsec=frontcover&redir_esc=y", bookid);
                                   ^~                                   ~~~~~~
In file included from /usr/include/stdio.h:862,

  -------------------------------------------------------------------

  This is an unstable amd64 chroot image at a tinderbox (==build bot)
  name: 17.0-no-multilib-hardened_test_20180820-192742

  -------------------------------------------------------------------

gcc-config -l:
 [1] x86_64-pc-linux-gnu-8.2.0 *

Available Python interpreters, in order of preference:
  [1]   python3.6
  [2]   python2.7 (fallback)




emerge -qpv app-text/getxbook
[ebuild  N    ] app-text/getxbook-1.2  USE="-djvu -ocr (-pdf) -tk"
Comment 1 Toralf Förster gentoo-dev 2018-08-21 19:21:32 UTC
Created attachment 544406 [details]
emerge-info.txt
Comment 2 Toralf Förster gentoo-dev 2018-08-21 19:21:34 UTC
Created attachment 544408 [details]
app-text:getxbook-1.2:20180821-185837.log
Comment 3 Toralf Förster gentoo-dev 2018-08-21 19:21:37 UTC
Created attachment 544410 [details]
emerge-history.txt
Comment 4 Toralf Förster gentoo-dev 2018-08-21 19:21:40 UTC
Created attachment 544412 [details]
environment
Comment 5 Toralf Förster gentoo-dev 2018-08-21 19:21:43 UTC
Created attachment 544414 [details]
etc.portage.tbz2
Comment 6 Toralf Förster gentoo-dev 2018-08-21 19:21:46 UTC
Created attachment 544416 [details]
temp.tbz2
Comment 7 rogge 2019-03-07 18:12:01 UTC
Same here:

x86_64-pc-linux-gnu-gcc -c -march=sandybridge -mtune=sandybridge -O2 -pipe --par                                                               am l1-cache-line-size=64 --param l1-cache-size=32 --param l2-cache-size=3072 -fs                                                               tack-clash-protection -std=c99 -pedantic -Wall -Wextra -Werror -g -D_POSIX_C_SOU                                                               RCE=200112L -DVERSION=\"1.2\" getabook.c                                                                                                       
getabook.c: In function ‘getpagelist’:                                                                                                         
getabook.c:76:80: error: ‘%s’ directive output may be truncated writing up to 10                                                               23 bytes into a region of size 969 [-Werror=format-truncation=]                                                                                
 rl, URLMAX, "/gp/search-inside/service-data?method=getBookData&asin=%s", booki)                                                               ;                                                                                   
                                                                     ^~   ~~~~~                                                                

In file included from /usr/include/stdio.h:862,                                                                                                
                 from getabook.c:2:                                                                                                            
/usr/include/bits/stdio2.h:64:10: note: ‘__builtin___snprintf_chk’ output betwee                                                               n 56 and 1079 bytes into a destination of size 1024                                                                                            
   return __builtin___snprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1,                                                                         
          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~                                                                         
        __bos (__s), __fmt, __va_arg_pack ());                                                                                                 
        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Comment 8 rogge 2019-03-07 18:13:30 UTC
Created attachment 568092 [details]
getxbook error log