Re: [Qemu-devel] [PULL 1/3] usb-mtp: Add some NULL checks for issues pointed out by coverity

2018-05-18 Thread Bandan Das
Bandan Das writes: >> If this is a "can't happen" situation we can mark it as a false >> positive in coverity. I posted a patch with an assert added in usb_mtp_get_data. I believe CID 1390604 can be marked as a false positive. Thanks, Bandan > The protocol ofcourse won't let

Re: [Qemu-devel] [PULL 1/3] usb-mtp: Add some NULL checks for issues pointed out by coverity

2018-05-17 Thread Bandan Das
Peter Maydell writes: > On 7 May 2018 at 10:44, Gerd Hoffmann wrote: >> From: Bandan Das >> >> CID 1390578: In usb_mtp_write_metadata, parent can never be NULL but >> just in case, add an assert >> CID 1390592: Check for o->format

Re: [Qemu-devel] [PULL 1/3] usb-mtp: Add some NULL checks for issues pointed out by coverity

2018-05-15 Thread Peter Maydell
On 7 May 2018 at 10:44, Gerd Hoffmann wrote: > From: Bandan Das > > CID 1390578: In usb_mtp_write_metadata, parent can never be NULL but > just in case, add an assert > CID 1390592: Check for o->format only if o !=NULL > CID 1390604: Check s->data_out != NULL

[Qemu-devel] [PULL 1/3] usb-mtp: Add some NULL checks for issues pointed out by coverity

2018-05-07 Thread Gerd Hoffmann
From: Bandan Das CID 1390578: In usb_mtp_write_metadata, parent can never be NULL but just in case, add an assert CID 1390592: Check for o->format only if o !=NULL CID 1390604: Check s->data_out != NULL in usb_mtp_handle_data Signed-off-by: Bandan Das