Bug 1079 - get_root_hub_name bug in windows.c
Summary: get_root_hub_name bug in windows.c
Status: RESOLVED FIXED
Alias: None
Product: libserialport
Classification: Unclassified
Component: Other (show other bugs)
Version: unreleased development snapshot
Hardware: All Windows
: High critical
Target Milestone: ---
Assignee: Nobody
URL:
Keywords:
: 1087 (view as bug list)
Depends on:
Blocks:
 
Reported: 2017-12-15 18:31 CET by Uwe Hermann
Modified: 2019-12-28 19:24 CET (History)
1 user (show)



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Uwe Hermann 2017-12-15 18:31:57 CET
Got this a while ago from Marek <borsuczek@gmail.com> via email:

"
ugh, there's link no contact info on https://sigrok.org, it took me 20
minutes to find this mail. There's a bug in libserialport's
get_root_hub_name in windows.c that caused a segmentation fault on my
machine.

root_hub_name_utf8 = wc_to_utf8(root_hub_name_wc->RootHubName, size);

size here is the size of the entire structure, not just the character
buffer. so it should rather be

root_hub_name_utf8 = wc_to_utf8(root_hub_name_wc->RootHubName,
size-sizeof(root_hub_name_wc->ActualLength));
"
Comment 1 Uwe Hermann 2018-03-30 22:16:24 CEST
*** Bug 1087 has been marked as a duplicate of this bug. ***
Comment 2 Uwe Hermann 2019-12-28 19:24:19 CET
Fixed all instances of this issue in 2e0437c28e272ff6c64c58d9b032986979289fae, thanks!