1
0
mirror of https://github.com/samba-team/samba.git synced 2025-02-26 21:57:41 +03:00

librpc:ndr_cab: Cast data pointer correctly

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
This commit is contained in:
Andreas Schneider 2017-05-09 16:51:43 +02:00 committed by Jeremy Allison
parent e54adf516e
commit 9a2180cd04

View File

@ -79,7 +79,7 @@ static uint32_t ndr_cab_compute_checksum(uint8_t *data, uint32_t length, uint32_
pb = data;
while (num_ulong-- > 0) {
ul = *pb++;
ul = (uint32_t)(*pb++);
ul |= (((uint32_t)(*pb++)) << 8);
ul |= (((uint32_t)(*pb++)) << 16);
ul |= (((uint32_t)(*pb++)) << 24);
@ -95,7 +95,7 @@ static uint32_t ndr_cab_compute_checksum(uint8_t *data, uint32_t length, uint32_
case 2:
ul |= (((uint32_t)(*pb++)) << 8);
case 1:
ul |= *pb++;
ul |= (uint32_t)(*pb++);
default:
break;
}