HomeFreeBSD

libfetch: Pass a zeroed digest to DigestCalcResponse.

Description

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

Details

Provenance
jhbAuthored on Nov 16 2022, 3:18 AM
Reviewer
emaste
Differential Revision
D36825: libfetch: Pass a zeroed digest to DigestCalcResponse.
Parents
rG6100374ccf26: diff: Don't (ab)use sprintf() as a kind of strcat().
Branches
Unknown
Tags
Unknown