Commit c7705f6
committed
gpu/utils: fix null pointer arithmetic in mp_log_source()
strchr() can return NULL when no newline is found. next was computed
as end + 1 before the null check, which is undefined behaviour.
Moved next assignment after the null check.1 parent e2180e5 commit c7705f6
1 file changed
Lines changed: 3 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
339 | 339 | | |
340 | 340 | | |
341 | 341 | | |
342 | | - | |
| 342 | + | |
343 | 343 | | |
344 | 344 | | |
| 345 | + | |
| 346 | + | |
345 | 347 | | |
346 | 348 | | |
347 | 349 | | |
| |||
0 commit comments