Bug 1079

Summary: get_root_hub_name bug in windows.c
Product: libserialport Reporter: Uwe Hermann <uwe>
Component: OtherAssignee: Nobody <nobody>
Status: RESOLVED FIXED    
Severity: critical CC: martin-sigrokbugs
Priority: High    
Version: unreleased development snapshot   
Target Milestone: ---   
Hardware: All   
OS: Windows   

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!