Skip to content
Commit a56dcc6b authored by Dan Carpenter's avatar Dan Carpenter Committed by David S. Miller
Browse files

net: cdc_ncm: Signedness bug in cdc_ncm_set_dgram_size()



This code is supposed to test for negative error codes and partial
reads, but because sizeof() is size_t (unsigned) type then negative
error codes are type promoted to high positive values and the condition
doesn't work as expected.

Fixes: 332f989a ("CDC-NCM: handle incomplete transfer of MTU")
Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 3b5a3997
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment