Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 714186 - net-libs/libnipper-0.12.6-r1 : /.../report-table.cpp: error: format not a string literal and no format arguments [-Werror=format-s
Summary: net-libs/libnipper-0.12.6-r1 : /.../report-table.cpp: error: format not a str...
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Mike Auty (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: format-security
  Show dependency tree
 
Reported: 2020-03-24 15:53 UTC by Toralf Förster
Modified: 2020-03-27 12:50 UTC (History)
0 users

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


Attachments
emerge-info.txt (emerge-info.txt,15.19 KB, text/plain)
2020-03-24 15:53 UTC, Toralf Förster
Details
emerge-history.txt (emerge-history.txt,49.79 KB, text/plain)
2020-03-24 15:53 UTC, Toralf Förster
Details
environment (environment,110.57 KB, text/plain)
2020-03-24 15:53 UTC, Toralf Förster
Details
etc.portage.tbz2 (etc.portage.tbz2,10.88 KB, application/x-bzip)
2020-03-24 15:53 UTC, Toralf Förster
Details
logs.tbz2 (logs.tbz2,4.09 KB, application/x-bzip)
2020-03-24 15:53 UTC, Toralf Förster
Details
net-libs:libnipper-0.12.6-r1:20200324-082202.log (net-libs:libnipper-0.12.6-r1:20200324-082202.log,14.09 KB, text/plain)
2020-03-24 15:53 UTC, Toralf Förster
Details
temp.tbz2 (temp.tbz2,27.16 KB, application/x-bzip)
2020-03-24 15:53 UTC, Toralf Förster
Details
libnipper-format-security.patch (libnipper-format-security.patch,771 bytes, patch)
2020-03-26 02:12 UTC, Mike Auty (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Toralf Förster gentoo-dev 2020-03-24 15:53:36 UTC
[  7%] Building CXX object CMakeFiles/nipper.dir/report/report-table.o
/usr/bin/x86_64-pc-linux-gnu-g++ -Dnipper_EXPORTS   -DNDEBUG -O2 -pipe -march=native  -falign-functions=32:25:16 -fno-common -Werror=format-security -Wformat -fPIC   -O2 -o CMakeFiles/nipper.dir/report/report-table.o -c /var/tmp/portage/net-libs/libnipper-0.12.6-r1/work/libnipper-0.12.6/report/report-table.cpp
/var/tmp/portage/net-libs/libnipper-0.12.6-r1/work/libnipper-0.12.6/report/report-table.cpp: In member function int Report::writeTable(Device::paragraphStruct*):
/var/tmp/portage/net-libs/libnipper-0.12.6-r1/work/libnipper-0.12.6/report/report-table.cpp:362:45: error: format not a string literal and no format arguments [-Werror=format-security]

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

  This is an unstable amd64 chroot image at a tinderbox (==build bot)
  name: 17.1_systemd-libressl-20200322-195413

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

  Please see the tracker bug for details.

gcc-config -l:
 [1] x86_64-pc-linux-gnu-9.3.0 *
clang version 10.0.0 
Target: x86_64-pc-linux-gnu
Thread model: posix
InstalledDir: /usr/lib/llvm/10/bin
/usr/lib/llvm/10
10.0.0
Available Python interpreters, in order of preference:
  [1]   python3.8
  [2]   python3.7
  [3]   python3.6
  [4]   python2.7 (fallback)
Available Ruby profiles:
  [1]   ruby24 (with Rubygems)
  [2]   ruby25 (with Rubygems) *
The Glorious Glasgow Haskell Compilation System, version 8.0.2

timestamp of HEAD at this tinderbox image:
/var/db/repos/gentoo	Tue 24 Mar 2020 07:41:45 AM UTC
/var/db/repos/libressl	Thu 19 Mar 2020 04:37:24 PM UTC

emerge -qpvO net-libs/libnipper
[ebuild  N    ] net-libs/libnipper-0.12.6-r1
Comment 1 Toralf Förster gentoo-dev 2020-03-24 15:53:39 UTC
Created attachment 625012 [details]
emerge-info.txt
Comment 2 Toralf Förster gentoo-dev 2020-03-24 15:53:42 UTC
Created attachment 625014 [details]
emerge-history.txt
Comment 3 Toralf Förster gentoo-dev 2020-03-24 15:53:44 UTC
Created attachment 625016 [details]
environment
Comment 4 Toralf Förster gentoo-dev 2020-03-24 15:53:47 UTC
Created attachment 625018 [details]
etc.portage.tbz2
Comment 5 Toralf Förster gentoo-dev 2020-03-24 15:53:50 UTC
Created attachment 625020 [details]
logs.tbz2
Comment 6 Toralf Förster gentoo-dev 2020-03-24 15:53:53 UTC
Created attachment 625022 [details]
net-libs:libnipper-0.12.6-r1:20200324-082202.log
Comment 7 Toralf Förster gentoo-dev 2020-03-24 15:53:55 UTC
Created attachment 625024 [details]
temp.tbz2
Comment 8 Mike Auty (RETIRED) gentoo-dev 2020-03-26 02:12:39 UTC
Created attachment 625882 [details, diff]
libnipper-format-security.patch

I couldn't recreate this when adding CFLAGS="-O2 -pipe -march=native  -falign-functions=32:25:16 -fno-common -Werror=format-security -Wformat", so I don't know if my toolchain would need compiling differently, but I think I've understood the error anyway.  Essentially there's a variable that could be changed which doesn't contain a format argument.  Since in the code the value doesn't ever actually change, I've made the entire thing a fixed const, which hopefully then will be accepted by the compiler.

Is there any way to easily test this patch in your build system, or let me know what changes I'd need to make to my system to be able to reproduce the error?