]> git.ipfire.org Git - thirdparty/openssl.git/commit
Fix sizing on variable in ossl-nghttp3-demo-server 26362/head
authorNeil Horman <nhorman@openssl.org>
Thu, 9 Jan 2025 17:12:09 +0000 (12:12 -0500)
committerNeil Horman <nhorman@openssl.org>
Sat, 11 Jan 2025 21:02:29 +0000 (16:02 -0500)
commitf565f03228ddd3b16ac2ffef7e460d8e425d394a
tree2f4554d17e053766180d68478205d2d3dd7e233c
parentf30b75a7fe443bfc1a6d72319febdc0295e637be
Fix sizing on variable in ossl-nghttp3-demo-server

On working on a rebase for the quic-server branch, I noted that the
rebase was failing on the http3 server.  It occurs because the new CI
ubuntu container appears to have FORTIFY_SOURCE enabled and trips over
the call to read here.  Specifically the compiler notes that in passing
an int into the read syscall (which accepts a size_t as the 3rd
argument), may interpret a negative value as a very large unsigned value
that exeeds the size allowed by a read call.

Fix it by converting the size variable to a size_t to ensure that the
signing is correct

Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Saša Nedvědický <sashan@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/26368)
demos/http3/ossl-nghttp3-demo-server.c