Commit e39b856
preproc: fix heap memory overflow CVE-2023-31722
paramlen has heap memory of length nparam+1. The value of variable i
may be greater than nparam+1, causing heap memory overflow. Therefore,
i and nparam+1 needs to be determined in the loop.
Fixes: https://bugzilla.nasm.us/show_bug.cgi?id=3392857#c1
Fixes: #83
Signed-off-by: H. Peter Anvin (Intel) <[email protected]>1 parent c651c28 commit e39b856
2 files changed
+4
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7245 | 7245 | | |
7246 | 7246 | | |
7247 | 7247 | | |
7248 | | - | |
| 7248 | + | |
7249 | 7249 | | |
7250 | 7250 | | |
7251 | 7251 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
74 | 74 | | |
75 | 75 | | |
76 | 76 | | |
77 | | - | |
| 77 | + | |
78 | 78 | | |
| 79 | + | |
| 80 | + | |
79 | 81 | | |
80 | 82 | | |
81 | 83 | | |
| |||
0 commit comments