]> git.ipfire.org Git - thirdparty/openssl.git/commit
Silence -Wstringop-overflow warnings with gcc 14 on s390x
authorIngo Franzki <ifranzki@linux.ibm.com>
Wed, 28 May 2025 06:55:49 +0000 (08:55 +0200)
committerTomas Mraz <tomas@openssl.org>
Tue, 10 Jun 2025 17:48:09 +0000 (19:48 +0200)
commit078a6dd3c14c77445123be538bb7ba1eb239a5a4
tree68ba88b031c036dcbce256ee949af474c97e963d
parent5f55c57d1e05a2cc5903a8a3e0f9ca4d8ceb0970
Silence -Wstringop-overflow warnings with gcc 14 on s390x

Compiling OpenSSL on s390x with gcc 14 (i.e. in Fedora 41) shows several
-Wstringop-overflow warnings in providers/implementations/rands/drbg_ctr.c
and test/params_api_test.c.

Add explicit length checks to let the compiler know that it won't overrun
the buffer. This also silences the warnings.

Signed-off-by: Ingo Franzki <ifranzki@linux.ibm.com>
Reviewed-by: Neil Horman <nhorman@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/27710)

(cherry picked from commit 9a788281d91f698d6a229d588b9cb36987549669)
providers/implementations/rands/drbg_ctr.c
test/params_api_test.c