push
github
hwdb: reject overlong fnmatch key instead of passing NULL to fnmatch() When the accumulated trie key exceeds the fixed-size line buffer, linebuf_get() returns NULL. trie_fnmatch_f() passed that NULL straight into fnmatch() as the pattern, causing a SIGSEGV on a crafted hwdb.bin (reachable now that recursion is capped rather than overflowing the stack first). Treat the NULL like the other corruption checks and return -EBADMSG. Follow-up for 73fea38cf Fixes https://github.com/systemd/systemd/issues/42376 Co-developed-by: Claude Opus 4.8 <noreply@anthropic.com>
7 of 7 new or added lines in 1 file covered. (100.0%)
428 existing lines in 41 files now uncovered.337411 of 462296 relevant lines covered (72.99%)
1276482.16 hits per line