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)
Sun, Nov 17, 4:39 AM
Unknown Object (File)
Fri, Nov 15, 12:55 AM
Unknown Object (File)
Oct 19 2024, 9:01 AM
Unknown Object (File)
Oct 2 2024, 5:00 AM
Unknown Object (File)
Sep 18 2024, 12:16 AM
Unknown Object (File)
Sep 4 2024, 7:56 PM
Unknown Object (File)
Aug 13 2024, 1:01 AM
Unknown Object (File)
Jun 26 2024, 3:38 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