Page MenuHomeFreeBSD

rs: Fix some pointer arith UB.
ClosedPublic

Authored by jhb on Sep 29 2022, 10:47 PM.
Tags
None
Referenced Files
F83656605: D36832.diff
Mon, May 13, 4:44 AM
Unknown Object (File)
Thu, Apr 25, 2:53 PM
Unknown Object (File)
Apr 7 2024, 12:28 PM
Unknown Object (File)
Mar 18 2024, 4:50 PM
Unknown Object (File)
Dec 29 2023, 10:28 AM
Unknown Object (File)
Dec 20 2023, 8:13 AM
Unknown Object (File)
Dec 12 2023, 4:21 AM
Unknown Object (File)
Nov 6 2023, 1:23 PM
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