HomeFreeBSD

Fix crash on parsing some inf files

Description

Fix crash on parsing some inf files

ndiscvt uses 16 entry array for words into which it parses
comma-separated lists of strings, like AddReg line in

[somesection]
    AddReg = foo.reg, bar.reg, baz.reg, quiz.reg

Overflows were not checked so it crashed on a line with 17 words
encountered in some Broadcom/Dell Wireless 1704 802.11b-g-n driver

So extend the array up to 32 entries and add an overflow check.

Reviewed by: bapt
Approved by: bapt
MFC after: 2 weeks
Differential Revision: D3713

Details

Provenance
AMDmi3Authored on
Reviewer
bapt
Differential Revision
D3713: Fix ndiscvt crash on some .inf files
Parents
rS288119: addr2line: skip CUs lacking debug info instead of bailing out
Branches
Unknown
Tags
Unknown