public inbox for newlib@sourceware.org
 help / color / mirror / Atom feed
From: Corinna Vinschen <vinschen@redhat.com>
To: newlib@sourceware.org
Subject: Re: [PATCH] svfwscanf: Simplify _sungetwc_r to eliminate apparent buffer overflow
Date: Thu, 19 Aug 2021 17:38:51 +0200	[thread overview]
Message-ID: <YR57C0wJrQtGJLNH@calimero.vinschen.de> (raw)
In-Reply-To: <87wnohbh14.fsf@keithp.com>

[Please don't CC me, I'm reading the ML all the time.  Thanks]

On Aug 19 08:17, Keith Packard wrote:
> Corinna Vinschen <vinschen@redhat.com> writes:
> 
> > Given all chars are sizeof(wchar_t), how's the buffer ever going to
> > become unaligned?
> 
> It places the wchar_t at the end of _ubuf, which is 3 bytes long, making
> it unaligned:
> 
>   fp->_p = &fp->_ubuf[sizeof (fp->_ubuf) - sizeof (wchar_t)];

Oops, right.


Thanks,
Corinna


      reply	other threads:[~2021-08-19 15:38 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-17 19:11 Keith Packard
2021-08-18  8:59 ` Corinna Vinschen
2021-08-18 16:30   ` Keith Packard
2021-08-18 16:50     ` Keith Packard
2021-08-19 10:10       ` Corinna Vinschen
2021-08-19 15:17         ` Keith Packard
2021-08-19 15:38           ` Corinna Vinschen [this message]

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:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

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

  git send-email \
    --in-reply-to=YR57C0wJrQtGJLNH@calimero.vinschen.de \
    --to=vinschen@redhat.com \
    --cc=newlib@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* 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).