mirror of
https://https.git.savannah.gnu.org/git/findutils.git
synced 2026-01-26 15:39:06 +00:00
maint: silence GCC-14 on utility source getlimits.c
Seen on GCC 14:
getlimits.c:73:3: warning: stack-based buffer overflow [CWE-121] \
[-Wanalyzer-out-of-bounds]
73 | sprintf (limit + 1, "%" "ju", (uintmax_t) TYPE##_MAX); \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
... while limit is defined more than large enough.
* find/getlimits.c: Add pragma for GCC version >= 14.
This commit is contained in:
parent
b52c6688ff
commit
a465fc58bc
@ -38,6 +38,11 @@
|
||||
# define MIN(a,b) (a<b?a:b)
|
||||
#endif
|
||||
|
||||
/* Silence GCC 14. */
|
||||
#if 14 <= __GNUC__
|
||||
# pragma GCC diagnostic ignored "-Wanalyzer-out-of-bounds"
|
||||
#endif
|
||||
|
||||
/* Add one to the absolute value of the number whose textual
|
||||
representation is BUF + 1. Do this in-place, in the buffer.
|
||||
Return a pointer to the result, which is normally BUF + 1, but is
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user