[Pkg-shadow-devel] Bug#1032393: Bug#1032393: [PATCH v2 2/2] debian/control: Add libbsd-dev and pkg-config
Alejandro Colomar
alx.manpages at gmail.com
Sat Mar 11 22:41:25 GMT 2023
On 3/11/23 23:38, Paul Eggert wrote:
> On 2023-03-11 13:59, Alejandro Colomar wrote:
>> If the function is allowed
>> to dereference, then NULL is not allowed, but if the values are
>> uninitialized, then reading any of them should also trigger UB, no?
>
> Sure, but the standard says that strftime reads only the struct tm
> members needed to interpret the format. If the format contains no
> conversion specs, strftime reads no struct tm members and thus there is
> no UB even if the struct tm is entirely uninitialized.
Yeah, my point then is that if you don't read members, you don't even
need to dereference. However, I see that glibc takes a copy, which is
a reason to dereference without reading any values. So, yes, you're
right ;)
--
<http://www.alejandro-colomar.es/>
GPG key fingerprint: A9348594CE31283A826FBDD8D57633D441E25BB5
-------------- next part --------------
A non-text attachment was scrubbed...
Name: OpenPGP_signature
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <http://alioth-lists.debian.net/pipermail/pkg-shadow-devel/attachments/20230311/c11e2ea7/attachment.sig>
More information about the Pkg-shadow-devel
mailing list