* -Werror=array-bounds
@ 2022-09-08 14:15 exactlywb
0 siblings, 0 replies; only message in thread
From: exactlywb @ 2022-09-08 14:15 UTC (permalink / raw)
To: elfutils-devel
Hi! I've noticed that in 81st line of image-header.c file is suspicious:
header = header_buffer - H_START;
As it's written in ISO/IEC 9899:1999:
- Addition or subtraction of a pointer into, or just beyond, an array
object and an
integer type produces a result that does not point into, or just beyond,
the same array
object
So it's kinda like ub. It doesn't look really dangerous, but maybe on
some architectures it can be crashed.
Thanks,
Frolov Daniil
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2022-09-08 14:15 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-08 14:15 -Werror=array-bounds exactlywb
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).