Page MenuHomeFreeBSD

rs: Fix some pointer arith UB.
ClosedPublic

Authored by jhb on Sep 29 2022, 10:47 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Dec 14, 6:45 PM
Unknown Object (File)
Nov 30 2024, 5:04 AM
Unknown Object (File)
Nov 26 2024, 8:46 PM
Unknown Object (File)
Nov 23 2024, 12:19 AM
Unknown Object (File)
Nov 17 2024, 4:39 AM
Unknown Object (File)
Nov 15 2024, 12:55 AM
Unknown Object (File)
Oct 19 2024, 9:01 AM
Unknown Object (File)
Oct 2 2024, 5:00 AM
Subscribers

Details

Summary

If the next column was blank, then the length of the following entry
was computed as the end of the following entry minus a global variable
"blank" which is not in the same string or allocation. Instead, save
the start value of 'p' explicitly instead of abusing '*ep'. Possibly
we should just increment p before saving it in sp in the 'blank' case,
but at worst that would just mean maxlen might be one char too large
which should be harmless.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable