[PATCH gnupg] Fix gcc -Wunterminated-string-initialization warnings.
Collin Funk
collin.funk1 at gmail.com
Wed Apr 30 18:47:03 CEST 2025
Hi Werner,
Werner Koch <wk at gnupg.org> writes:
> On Tue, 29 Apr 2025 21:01, Collin Funk said:
>> (has_only_base64): Use memchr since calling strchr on a non-NUL
>> terminated string is undefined behavior.
>
> Very good catch. I was my fault 22 years ago:
> [...]
> Thanks for the patch. I am going to apply this to all branches.
Thanks! It was the first time I was alerted to a bug by this new GCC 15
warning. The other cases I saw in Gnulib and Emacs were harmless.
> Regarding the nonstring attribute we need to wait that we can make
> libgpg-error 1.55 a requirement. That version provides the
> GPGRT_ATTR_NONSTRING. For master we might soon make this a dependency
> but not for the other branches.
Sure, I saw that macro was recently added which was why my patch used
internal macros. But if you prefer to not duplicate the GCC version
checks and such that is fine by me.
Collin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 832 bytes
Desc: not available
URL: <https://lists.gnupg.org/pipermail/gnupg-devel/attachments/20250430/ee5a1140/attachment.sig>
More information about the Gnupg-devel
mailing list