[PATCH] Improve the width of alternate representation for year in strftime [BZ #23758]

Florian Weimer fweimer@redhat.com
Wed Oct 24 08:01:00 GMT 2018


* Rafal Luzynski:

> 23.10.2018 14:54 Florian Weimer <fweimer@redhat.com> wrote:
>> [...]
>> This should also avoid the need for new memory allocations.
>> 
>> Thanks,
>> Florian
>
> While at this, Florian, I think you tried to eliminate all occurrences
> of alloca family functions in the past.  I can see that Tamuki Shoichi's
> patch uses alloca family optionally.  Shouldn't this patch just assume
> that alloca is never used, and using_malloc is always true and therefore
> can be dropped?  The patch would be simpler and IIUC more secure.

Right, that's why I suggested not to rewrite the format string.  Then
the alloca will be gone because the copy is not needed.

Thanks,
Florian



More information about the Libc-alpha mailing list