[PATCH v2 3/3] stdio-common: Allow partially-filled %mc buffers [BZ #12701]
Florian Weimer
fweimer@redhat.com
Tue Jun 2 09:00:53 GMT 2026
* Carlos O'Donell:
> On 5/27/26 12:57 PM, DJ Delorie wrote:
>> This is a backwards-compatible alternative to the main solution to
>> the %mc part of 12701. The allocated buffer is expanded to the
>> requested size and NUL padded, but truncated reads are allowed.
>
> LGTM. While there is some dead code in vfscanf-internal.c given that
> you do the filling, I don't think removing it is a good diea. The
> point is to make this a minimal patch without changing other stuff
> too (and it's harder to prove and we discussed this aspect).
>
> Reviewed-by: Carlos O'Donell <carlos@redhat.com>
I think it's better to remove the dead code, so that we get a conflict
if we backport a further changes to these parts, instead of no conflict
during a backport that won't have the intended effect.
Thanks,
Florian
More information about the Libc-stable
mailing list