Skip to content

Commit

Permalink
Update usbhotplug.cpp
Browse files Browse the repository at this point in the history
Bugfix against SegFault of #420: If info is 0, no access on content is possible.
  • Loading branch information
capiman authored and nxpfrankli committed Apr 22, 2024
1 parent b6ae918 commit d362f4a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion libuuu/usbhotplug.cpp
Expand Up @@ -247,7 +247,8 @@ static string get_device_serial_no(libusb_device *dev, struct libusb_device_desc

if (!sid) {
const ROM_INFO *info= search_rom_info(item);
sid = info->serial_idx;
if (info)
sid = info->serial_idx;
}

serial.resize(SERIAL_NO_MAX);
Expand Down

0 comments on commit d362f4a

Please sign in to comment.