"num_bytes" is uint32_t, "received" is uint16_t. The multiplication
seems to implicitly widen "received" to int, leading to a
signed/unsigned warning. This cast makes that warning go away.
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
* I don't think this can wrap. received is
* initialized from a 16-bit value.
*/
- if (num_bytes < (received * DIR_STRUCT_SIZE + 3)) {
+ if (num_bytes < ((uint32_t)received * DIR_STRUCT_SIZE + 3)) {
TALLOC_FREE(subreq);
tevent_req_nterror(
req, NT_STATUS_INVALID_NETWORK_RESPONSE);