libusbgx: Do not dereference usb config attributes when they are NULL. CID#56126
authorPhilippe De Swert <philippe.deswert@jollamobile.com>
Tue, 13 May 2014 13:43:11 +0000 (16:43 +0300)
committerKrzysztof Opasiak <k.opasiak@samsung.com>
Tue, 22 Dec 2015 19:39:23 +0000 (20:39 +0100)
commit8d2e47a48a0b46ec02b8e0a36abf92964854e924
tree174844f2fd8e3b4920afa4e67ac0e7e140fe170e
parent6f4e2b6d25892f5c353e1d24ca198987a209e5dc
libusbgx: Do not dereference usb config attributes when they are NULL. CID#56126

We probably need to check if we get valid attributes passed. Otherwise we will
try to dereference a NULL-pointer as the usb_config_attr will not be valid.

Signed-off-by: Philippe De Swert <philippe.deswert@jollamobile.com>
[Port from libusbg and update description]
Signed-off-by: Krzysztof Opasiak <k.opasiak@samsung.com>
src/usbg.c