mirror of
https://github.com/reactos/syzkaller.git
synced 2024-11-24 03:49:45 +00:00
executor: fix sigsegv for default USB string response
This commit is contained in:
parent
bf6bcce4f2
commit
c16be727a6
@ -199,7 +199,7 @@ static bool lookup_connect_response(struct vusb_connect_descriptors* descs, stru
|
||||
return true;
|
||||
case USB_DT_STRING:
|
||||
str_idx = (uint8)ctrl->wValue;
|
||||
if (str_idx >= descs->strs_len) {
|
||||
if (!descs || str_idx >= descs->strs_len) {
|
||||
// Use the default string if we ran out.
|
||||
*response_data = (char*)default_string;
|
||||
*response_length = strlen(default_string);
|
||||
|
@ -1947,7 +1947,7 @@ static bool lookup_connect_response(struct vusb_connect_descriptors* descs, stru
|
||||
return true;
|
||||
case USB_DT_STRING:
|
||||
str_idx = (uint8)ctrl->wValue;
|
||||
if (str_idx >= descs->strs_len) {
|
||||
if (!descs || str_idx >= descs->strs_len) {
|
||||
*response_data = (char*)default_string;
|
||||
*response_length = strlen(default_string);
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user