Unverified Commit 1f5fe404 authored by openeuler-ci-bot's avatar openeuler-ci-bot Committed by Gitee
Browse files

!10406 usb: gadget: ncm: Fix handling of zero block length packets

parents 25aa25b6 4f4bab29
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1357,7 +1357,7 @@ static int ncm_unwrap_ntb(struct gether *port,
	if (to_process == 1 &&
	    (*(unsigned char *)(ntb_ptr + block_len) == 0x00)) {
		to_process--;
	} else if (to_process > 0) {
	} else if ((to_process > 0) && (block_len != 0)) {
		ntb_ptr = (unsigned char *)(ntb_ptr + block_len);
		goto parse_ntb;
	}