[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#997173: marked as done (procinfo: FTBFS: procinfo.cpp:214:22: error: format not a string literal and no format arguments [-Werror=format-security])



Your message dated Thu, 11 Nov 2021 13:34:10 +0000
with message-id <E1mlADS-000HJO-KR@fasolo.debian.org>
and subject line Bug#997173: fixed in procinfo 1:2.0.304-6
has caused the Debian Bug report #997173,
regarding procinfo: FTBFS: procinfo.cpp:214:22: error: format not a string literal and no format arguments [-Werror=format-security]
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact owner@bugs.debian.org
immediately.)


-- 
997173: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=997173
Debian Bug Tracking System
Contact owner@bugs.debian.org with problems
--- Begin Message ---
Source: procinfo
Version: 1:2.0.304-5
Severity: serious
Justification: FTBFS
Tags: bookworm sid ftbfs

Hi,

During a rebuild of all packages in sid, your package failed to build
on amd64.


Relevant part (hopefully):
> g++ -g -O2 -ffile-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -pipe -Wall -Wdate-time -D_FORTIFY_SOURCE=2 procinfo.cpp -Wl,-z,relro -Wl,-z,now -s -lncurses -o procinfo
> In file included from procinfo.cpp:43:
> lib/routines.cpp: In function ‘const string humanizeBigNums(int64_t, uint32_t)’:
> lib/routines.cpp:265:32: warning: ISO C++17 does not allow ‘register’ storage class specifier [-Wregister]
>   265 |         const register int64_t absVal = llabs(val);
>       |                                ^~~~~~
> lib/routines.cpp: In function ‘const string humanizeBigNums(T, uint32_t)’:
> lib/routines.cpp:308:26: warning: ISO C++17 does not allow ‘register’ storage class specifier [-Wregister]
>   308 |         const register T absVal = fabs(val);
>       |                          ^~~~~~
> In file included from procinfo.cpp:44:
> lib/timeRoutines.cpp: In function ‘const timeDiff __time_rel(const time_t&, const time_t&)’:
> lib/timeRoutines.cpp:134:60: warning: narrowing conversion of ‘(uint32_t)result1.timeWDHMS::minutes’ from ‘uint32_t’ {aka ‘unsigned int’} to ‘int’ [-Wnarrowing]
>   134 |                 { tm_sec: result1.seconds, tm_min: result1.minutes, tm_hour: result1.hours,
>       |                                                    ~~~~~~~~^~~~~~~
> lib/timeRoutines.cpp:134:86: warning: narrowing conversion of ‘(uint32_t)result1.timeWDHMS::hours’ from ‘uint32_t’ {aka ‘unsigned int’} to ‘int’ [-Wnarrowing]
>   134 |                 { tm_sec: result1.seconds, tm_min: result1.minutes, tm_hour: result1.hours,
>       |                                                                              ~~~~~~~~^~~~~
> lib/timeRoutines.cpp:135:34: warning: narrowing conversion of ‘(uint32_t)result1.timeWDHMS::days’ from ‘uint32_t’ {aka ‘unsigned int’} to ‘int’ [-Wnarrowing]
>   135 |                 tm_wday: result1.days, tm_week: result1.weeks };
>       |                          ~~~~~~~~^~~~
> lib/timeRoutines.cpp:135:57: warning: narrowing conversion of ‘(uint32_t)result1.timeWDHMS::weeks’ from ‘uint32_t’ {aka ‘unsigned int’} to ‘int’ [-Wnarrowing]
>   135 |                 tm_wday: result1.days, tm_week: result1.weeks };
>       |                                                 ~~~~~~~~^~~~~
> lib/timeRoutines.cpp: In function ‘const timeDiff __time_rel(const double&, const double&)’:
> lib/timeRoutines.cpp:141:60: warning: narrowing conversion of ‘(uint32_t)result1.timeWDHMS::minutes’ from ‘uint32_t’ {aka ‘unsigned int’} to ‘int’ [-Wnarrowing]
>   141 |                 { tm_sec: result1.seconds, tm_min: result1.minutes, tm_hour: result1.hours,
>       |                                                    ~~~~~~~~^~~~~~~
> lib/timeRoutines.cpp:141:86: warning: narrowing conversion of ‘(uint32_t)result1.timeWDHMS::hours’ from ‘uint32_t’ {aka ‘unsigned int’} to ‘int’ [-Wnarrowing]
>   141 |                 { tm_sec: result1.seconds, tm_min: result1.minutes, tm_hour: result1.hours,
>       |                                                                              ~~~~~~~~^~~~~
> lib/timeRoutines.cpp:142:34: warning: narrowing conversion of ‘(uint32_t)result1.timeWDHMS::days’ from ‘uint32_t’ {aka ‘unsigned int’} to ‘int’ [-Wnarrowing]
>   142 |                 tm_wday: result1.days, tm_week: result1.weeks };
>       |                          ~~~~~~~~^~~~
> lib/timeRoutines.cpp:142:57: warning: narrowing conversion of ‘(uint32_t)result1.timeWDHMS::weeks’ from ‘uint32_t’ {aka ‘unsigned int’} to ‘int’ [-Wnarrowing]
>   142 |                 tm_wday: result1.days, tm_week: result1.weeks };
>       |                                                 ~~~~~~~~^~~~~
> lib/timeRoutines.cpp: In function ‘const timeDiff structTM2structTD(tm)’:
> lib/timeRoutines.cpp:185:31: warning: narrowing conversion of ‘input.tm::tm_sec’ from ‘int’ to ‘double’ [-Wnarrowing]
>   185 |                 tm_sec: input.tm_sec, tm_min: input.tm_min, tm_hour: input.tm_hour,
>       |                         ~~~~~~^~~~~~
> In file included from procinfo.cpp:45:
> lib/prettyPrint.cpp: In function ‘int print(const char*, ...)’:
> lib/prettyPrint.cpp:42:32: warning: ‘int vwprintw(WINDOW*, const char*, __va_list_tag*)’ is deprecated [-Wdeprecated-declarations]
>    42 |                 code = vwprintw(stdscr, fmt, argp);
>       |                        ~~~~~~~~^~~~~~~~~~~~~~~~~~~
> In file included from procinfo.cpp:39:
> /usr/include/curses.h:812:28: note: declared here
>   812 | extern NCURSES_EXPORT(int) vwprintw (WINDOW *, const char *, va_list) GCC_DEPRECATED(use vw_printw)     /* implemented */
>       |                            ^~~~~~~~
> procinfo.cpp: In function ‘int mainLoop(bool, bool, bool, bool, bool, bool, bool, bool, bool, uint32_t, const std::vector<IRQ>&)’:
> procinfo.cpp:214:22: error: format not a string literal and no format arguments [-Werror=format-security]
>   214 |                 print(exceptionMessage.c_str());
>       |                 ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~
> In file included from procinfo.cpp:125:
> diskStats.cpp: In function ‘std::vector<std::vector<std::__cxx11::basic_string<char> > > renderDiskStats(bool, bool, bool, double, const std::vector<diskStat_t>&)’:
> diskStats.cpp:136:41: warning: ‘__builtin___snprintf_chk’ output truncated before the last format character [-Wformat-truncation=]
>   136 |         snprintf(output, 39, "%-4s %-34s", diskStat.name.c_str(), rendered.c_str());
>       |                                         ^
> In file included from /usr/include/stdio.h:866,
>                  from /usr/include/c++/11/cstdio:42,
>                  from /usr/include/c++/11/ext/string_conversions.h:43,
>                  from /usr/include/c++/11/bits/basic_string.h:6606,
>                  from /usr/include/c++/11/string:55,
>                  from /usr/include/c++/11/bits/locale_classes.h:40,
>                  from /usr/include/c++/11/bits/ios_base.h:41,
>                  from /usr/include/c++/11/ios:42,
>                  from /usr/include/c++/11/ostream:38,
>                  from /usr/include/c++/11/iostream:39,
>                  from procinfo.cpp:18:
> /usr/include/x86_64-linux-gnu/bits/stdio2.h:70:35: note: ‘__builtin___snprintf_chk’ output 40 or more bytes into a destination of size 39
>    70 |   return __builtin___snprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1,
>       |          ~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>    71 |                                    __bos (__s), __fmt, __va_arg_pack ());
>       |                                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> In file included from procinfo.cpp:65:
> rendercpupagestat.cpp: In function ‘std::vector<std::vector<std::__cxx11::basic_string<char> > > renderCPUandPageStats(bool, bool, const double&, const uint64_t&, const uint64_t&, const std::vector<long unsigned int>&, const uint64_t&, const std::vector<long unsigned int>&)’:
> rendercpupagestat.cpp:18:52: warning: ‘__builtin___snprintf_chk’ output truncated before the last format character [-Wformat-truncation=]
>    18 |                 snprintf(fractionalSeconds, 2, "%2d", getFrac(cpuDiff / USER_HZ, 100));
>       |                                                    ^
> In file included from /usr/include/stdio.h:866,
>                  from /usr/include/c++/11/cstdio:42,
>                  from /usr/include/c++/11/ext/string_conversions.h:43,
>                  from /usr/include/c++/11/bits/basic_string.h:6606,
>                  from /usr/include/c++/11/string:55,
>                  from /usr/include/c++/11/bits/locale_classes.h:40,
>                  from /usr/include/c++/11/bits/ios_base.h:41,
>                  from /usr/include/c++/11/ios:42,
>                  from /usr/include/c++/11/ostream:38,
>                  from /usr/include/c++/11/iostream:39,
>                  from procinfo.cpp:18:
> /usr/include/x86_64-linux-gnu/bits/stdio2.h:70:35: note: ‘__builtin___snprintf_chk’ output 3 bytes into a destination of size 2
>    70 |   return __builtin___snprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1,
>       |          ~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>    71 |                                    __bos (__s), __fmt, __va_arg_pack ());
>       |                                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> cc1plus: some warnings being treated as errors
> make[1]: *** [Makefile:47: procinfo] Error 1


The full build log is available from:
http://qa-logs.debian.net/2021/10/23/procinfo_2.0.304-5_unstable.log

A list of current common problems and possible solutions is available at
http://wiki.debian.org/qa.debian.org/FTBFS . You're welcome to contribute!

If you reassign this bug to another package, please marking it as 'affects'-ing
this package. See https://www.debian.org/Bugs/server-control#affects

If you fail to reproduce this, please provide a build log and diff it with mine
so that we can identify if something relevant changed in the meantime.

--- End Message ---
--- Begin Message ---
Source: procinfo
Source-Version: 1:2.0.304-6
Done: Stephen Kitt <skitt@debian.org>

We believe that the bug you reported is fixed in the latest version of
procinfo, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 997173@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Stephen Kitt <skitt@debian.org> (supplier of updated procinfo package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@ftp-master.debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

Format: 1.8
Date: Thu, 11 Nov 2021 14:17:27 +0100
Source: procinfo
Architecture: source
Version: 1:2.0.304-6
Distribution: unstable
Urgency: medium
Maintainer: Debian QA Group <packages@qa.debian.org>
Changed-By: Stephen Kitt <skitt@debian.org>
Closes: 970962 997173
Changes:
 procinfo (1:2.0.304-6) unstable; urgency=medium
 .
   * QA upload.
   * Ensure format strings are literals. Closes: #997173.
   * Mark autopkgtests as superficial. Closes: #970962.
   * Fix debian/copyright license declarations.
   * Standards-Version 4.6.0, no change required.
Checksums-Sha1:
 da924b64dfd2034a951bf201b5b68a5b7bff7d8d 1881 procinfo_2.0.304-6.dsc
 d3cd7ab7bc4403610588bcbcae5f2f2b536b0fab 9780 procinfo_2.0.304-6.debian.tar.xz
 b23a90f9ec70a70a3da94fc1db12ccb4040da7a4 6326 procinfo_2.0.304-6_source.buildinfo
Checksums-Sha256:
 c6325b832c84aa9aae7a4c110181b203948887d3c16a47581caf07e919af5783 1881 procinfo_2.0.304-6.dsc
 f3916c3dc5fe5a54c834dafea221aea66e367ce55eaf725325d60252b4585bd1 9780 procinfo_2.0.304-6.debian.tar.xz
 a6712f8748d3ac2565b6c3dd3263a1fdf31453804abf4ac8ea40d6885871a5c8 6326 procinfo_2.0.304-6_source.buildinfo
Files:
 11743f7e9ac0a1239a3ed7abd9ac12fd 1881 utils optional procinfo_2.0.304-6.dsc
 40586f143e9eac3f1a25d74c8697c744 9780 utils optional procinfo_2.0.304-6.debian.tar.xz
 430abcf65a8d3ab3039be47852b608a6 6326 utils optional procinfo_2.0.304-6_source.buildinfo

-----BEGIN PGP SIGNATURE-----

iQIzBAEBCgAdFiEEnPVX/hPLkMoq7x0ggNMC9Yhtg5wFAmGNF+8ACgkQgNMC9Yht
g5xJJQ/9EAJ25gyS8cGsXF7+NCb7R5b/gqC2ozYEZgQpe6kfzTSPxW10kzlVSwBv
C6dxrOedsj3tdIoxXsgH3na+yxHH1SSlsOD10kaSt+qIUFhaYrYs1zFLbWlRmNVU
0KyjDFlZ4zZO12rM3BmFQFMBaYCovtEjvlpxbY/bX5DUVPAzDDuwUcyS1BEa6de6
mxb8r5apq/TLVw2rhRqrg/fj498Fw1PnBk+jzilPGMVq0s9X+eLI/Mhf16pkolHr
bug+XwYfpwU5DfT/zimX1iNwdsyket006+1h6MwUrJunMYVQQyCtRuSDEqIicRuA
ZXOUWz+NKKOmz2aJFBqzdRmFQRAaVexiraTqLLkk6lPhwoJKFkdeuLJMW0uwj9uJ
jeis1h795k374q3ISwO/3AHmRyJplcoqlN4SvFXWdUMhQgoYTmTGRK9KdDfT2b3D
PFJxhM3AQpd1aBEmWnZ8+w85jAgFkRIDDCUPndb5MNiFRuuTqmDaZdjZms/1ing9
23YcrB78uAvHV3dg6KmIYJWkvnMXrJu39EMSlFWsaWl+/DxKxBCcgl0erEuqnptn
5gIN6Cf/vsowrWY8IMQCCRUUYtauU8quV4X812nqk4TJlKyqR+Zwdvz5WvrcS1R9
7HyZGoVMYQIIpnz+6AniNmj69EPqSAR36cnClipnIEOs3vvgmDg=
=wImK
-----END PGP SIGNATURE-----

--- End Message ---

Reply to: