Commit 0d91e34
committed
logger: fix off-by-one sscanf width in filter_parse_component_name
filter_parse_component_name() builds the sscanf format string with
field width UUID_NAME_MAX_LEN, but a %N[...] conversion writes up to
N characters plus a NUL terminator. comp_name is only
UUID_NAME_MAX_LEN bytes, so a component name of exactly that length
overflows the stack buffer by one byte.
Cap the scan width at UUID_NAME_MAX_LEN - 1 so the terminator always
fits in comp_name.
Signed-off-by: jmestwa-coder <jmestwa@gmail.com>1 parent 0f9fa75 commit 0d91e34
1 file changed
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
104 | 104 | | |
105 | 105 | | |
106 | 106 | | |
107 | | - | |
| 107 | + | |
108 | 108 | | |
109 | 109 | | |
110 | 110 | | |
| |||
0 commit comments