Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 664214 - 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=]
Summary: app-text/getxbook-1.2 : getgbook.c:46:35: error: %s directive output may be t...
Status: CONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Andrey Grozin
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-08-21 19:21 UTC by Toralf Förster
Modified: 2019-12-30 12:41 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
emerge-info.txt (emerge-info.txt,15.31 KB, text/plain)
2018-08-21 19:21 UTC, Toralf Förster
Details
app-text:getxbook-1.2:20180821-185837.log (app-text:getxbook-1.2:20180821-185837.log,3.33 KB, text/plain)
2018-08-21 19:21 UTC, Toralf Förster
Details
emerge-history.txt (emerge-history.txt,38.17 KB, text/plain)
2018-08-21 19:21 UTC, Toralf Förster
Details
environment (environment,74.63 KB, text/plain)
2018-08-21 19:21 UTC, Toralf Förster
Details
etc.portage.tbz2 (etc.portage.tbz2,12.71 KB, application/x-bzip)
2018-08-21 19:21 UTC, Toralf Förster
Details
temp.tbz2 (temp.tbz2,18.73 KB, application/x-bzip)
2018-08-21 19:21 UTC, Toralf Förster
Details
getxbook error log (getxbook-error.txt,10.05 KB, text/plain)
2019-03-07 18:13 UTC, rogge
Details

Note You need to log in before you can comment on or make changes to this bug.
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