aboutsummaryrefslogtreecommitdiffstats
path: root/executor/common_usb.h
diff options
context:
space:
mode:
authorAndrey Konovalov <andreyknvl@google.com>2019-09-06 19:18:59 +0200
committerAndrey Konovalov <andreyknvl@gmail.com>2019-09-06 20:11:54 +0200
commit3fe4b3b1aa1d5b8c47933aa1c1e32aa9f638561a (patch)
tree6032b303f36dfb885703e754cc0098b602b84bfd /executor/common_usb.h
parent1af11d9328777f3420762ca69da246396d7c29ae (diff)
executor/usb: fix null-ptr-deref in syz_usb_control_io
Diffstat (limited to 'executor/common_usb.h')
-rw-r--r--executor/common_usb.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/executor/common_usb.h b/executor/common_usb.h
index ccf00d7ba..eaffd8108 100644
--- a/executor/common_usb.h
+++ b/executor/common_usb.h
@@ -447,7 +447,7 @@ static bool lookup_control_response(struct vusb_descriptors* descs, struct vusb_
}
}
- if (descs->generic) {
+ if (descs && descs->generic) {
*response_data = &descs->generic->data[0];
*response_length = descs->generic->len;
return true;
@@ -469,7 +469,7 @@ static bool lookup_control_response(struct vusb_descriptors* descs, struct vusb_
}
}
- if (resps->generic) {
+ if (resps && resps->generic) {
*response_data = &resps->generic->data[0];
*response_length = resps->generic->len;
return true;