Commit 00c6490
committed
BR3392776: parser: parse_line -- fix unitialized memory access
Andrew reported that we may access unitialized memory
> SUMMARY: MemorySanitizer: use-of-uninitialized-value nasm/asm/parser.c:982:41 in parse_line
It turns out that in case of malformed data the expression is terminator
itself so we should not "lookup ahead" for next one. Thus test for first
expression initially and if test passes check for terminator.
Reported-by: Andrew Bao <[email protected]>
Signed-off-by: Cyrill Gorcunov <[email protected]>1 parent 3a81150 commit 00c6490
1 file changed
+4
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
979 | 979 | | |
980 | 980 | | |
981 | 981 | | |
982 | | - | |
983 | | - | |
984 | | - | |
| 982 | + | |
| 983 | + | |
985 | 984 | | |
986 | | - | |
| 985 | + | |
987 | 986 | | |
988 | | - | |
| 987 | + | |
989 | 988 | | |
990 | 989 | | |
991 | 990 | | |
| |||
0 commit comments