Commit b016347
lwres: Fix an undefined behavior in pointer arithmetic
Check for truncation before doing pointer arithmetic to point
to the end of the packet.
print-lwres.c:294:10: runtime error: addition of unsigned offset to
0xf3b032be overflowed to 0x9652d560
SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior print-lwres.c:294:10
[Part of the PR #1012]1 parent fc9abd5 commit b016347
File tree
4 files changed
+5
-1
lines changed- tests
4 files changed
+5
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
291 | 291 | | |
292 | 292 | | |
293 | 293 | | |
294 | | - | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
295 | 297 | | |
296 | 298 | | |
297 | 299 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
927 | 927 | | |
928 | 928 | | |
929 | 929 | | |
| 930 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
Binary file not shown.
0 commit comments