Re: Fw: New Defects reported by Coverity Scan for Linux

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Oliver Neukum <oneukum@xxxxxxxx> writes:
> Am Montag, den 03.04.2017, 12:48 -0700 schrieb Stephen Hemminger:
>> Looks like new warnings in usbnet
>> 
>> 
>> ** CID 751368:  Null pointer dereferences  (FORWARD_NULL)
>> /drivers/net/usb/usbnet.c: 1925 in __usbnet_read_cmd()
>
> Hi Stephen,
>
> I am afraid I don't see the problem. Yes, we are passing
> a NULL pointer down, but only if size==0. In that case it
> is allowed.
> Could you shed some light on the meaning of the report?
> I might be overlooking something, but to me it looks
> like a false positive.

I wonder if the problem is the unvalidated assumption that
"data == NULL" implies "size == 0".

We don't actually test for "size == 0".  Maybe we should?



Bjørn
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux