public inbox for
 help / color / mirror / Atom feed
Subject: -Werror=array-bounds
Date: Thu, 08 Sep 2022 17:15:44 +0300	[thread overview]
Message-ID: <> (raw)

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

So it's kinda like ub. It doesn't look really dangerous, but maybe on 
some architectures it can be crashed.

Frolov Daniil

                 reply	other threads:[~2022-09-08 14:15 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).