Skip to content

Commit

Permalink
Fix iteration over wchar hardware ID string. Fixes occasional BSOD. F…
Browse files Browse the repository at this point in the history
…ix courtesy of Tim Edmonds.
  • Loading branch information
cpeacock committed Apr 3, 2012
1 parent 776521b commit fdcc87c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions driver/pnp.c
Original file line number Diff line number Diff line change
Expand Up @@ -1226,7 +1226,7 @@ NTSTATUS bus_plugin_dev(ioctl_usbvbus_plugin * plugin, PFDO_DEVICE_DATA fdodata
HARDWARE_IDS_TPL,
plugin->vendor, plugin->product, plugin->version,
plugin->vendor, plugin->product);
for(i=0;i<sizeof(HARDWARE_IDS_TPL);i++){
for(i=0;i<len/sizeof(wchar_t);i++){
if('Z'==pdodata->HardwareIDs[i])
pdodata->HardwareIDs[i]=0;
}
Expand All @@ -1252,7 +1252,7 @@ NTSTATUS bus_plugin_dev(ioctl_usbvbus_plugin * plugin, PFDO_DEVICE_DATA fdodata
plugin->int0_class, plugin->int0_subclass, plugin->int0_protocol,
plugin->int0_class, plugin->int0_subclass,
plugin->int0_class);
for(i=0;i<len;i++){
for(i=0;i<len/sizeof(wchar_t);i++){
if('Z'==pdodata->compatible_ids[i])
pdodata->compatible_ids[i]=0;
}
Expand Down

0 comments on commit fdcc87c

Please sign in to comment.