mirror of
https://github.com/samba-team/samba.git
synced 2025-02-24 13:57:43 +03:00
librpc/ndr: Remove unused ndr_cab_generate_checksum()
This function is not just unused, it is a problem because there is no enforced connection between r->ab.length and r->cbData. The last caller was removed in the previous commit. Found by Douglas Bagnall using Hongfuzz and the new fuzz_ndr_X fuzzer. Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
This commit is contained in:
parent
bd81733bb7
commit
674d2cfd04
@ -111,17 +111,6 @@ static uint32_t ndr_cab_compute_checksum(uint8_t *data, uint32_t length, uint32_
|
||||
return checksum;
|
||||
}
|
||||
|
||||
uint32_t ndr_cab_generate_checksum(const struct CFDATA *r)
|
||||
{
|
||||
uint32_t csumPartial;
|
||||
|
||||
csumPartial = ndr_cab_compute_checksum(&r->ab.data[0], r->cbData, 0);
|
||||
|
||||
return ndr_cab_compute_checksum((uint8_t *)discard_const(&r->cbData),
|
||||
sizeof(r->cbData) + sizeof(r->cbUncomp),
|
||||
csumPartial);
|
||||
}
|
||||
|
||||
/* Push all CFDATA of a folder.
|
||||
*
|
||||
* This works on a folder level because compression type is set per
|
||||
|
@ -20,4 +20,3 @@
|
||||
*/
|
||||
|
||||
uint32_t ndr_count_cfdata(const struct cab_file *r);
|
||||
uint32_t ndr_cab_generate_checksum(const struct CFDATA *r);
|
||||
|
Loading…
x
Reference in New Issue
Block a user