]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
libfetch: Pass a zeroed digest to DigestCalcResponse.
authorJohn Baldwin <jhb@FreeBSD.org>
Wed, 16 Nov 2022 03:18:58 +0000 (19:18 -0800)
committerJohn Baldwin <jhb@FreeBSD.org>
Tue, 24 Jan 2023 05:13:19 +0000 (21:13 -0800)
commit13961b5a48d10e3a045a54ce9a6639bce9416989
tree0a171cc07c0870f632a761aa8ae50aa96686c148
parenta8b6a13b0aa3408a7793dad22ad0193a2c32477f
libfetch: Pass a zeroed digest to DigestCalcResponse.

GCC 12 warns that passing "" (a constant of char[1]) to a parameter of
type char[33] could potentially overread.  It is not clear from the
context that c->qops can never be "auth-int" (and if it can't, then
the "auth-int" handling in DigestCalcResponse is dead code that should
be removed since this is the only place the function is called).

Reviewed by: emaste
Differential Revision: https://reviews.freebsd.org/D36825

(cherry picked from commit 57fbafb8deac75b924faf1fa6c2222a7719fdfec)
lib/libfetch/http.c