Page MenuHomeFreeBSD

sh: Don't add something to a null pointer
ClosedPublic

Authored by jilles on Jan 23 2022, 9:28 PM.
Tags
None
Referenced Files
F108317957: D34011.diff
Thu, Jan 23, 7:57 PM
Unknown Object (File)
Mon, Jan 20, 1:05 PM
Unknown Object (File)
Mon, Jan 20, 12:34 PM
Unknown Object (File)
Mon, Jan 20, 12:31 PM
Unknown Object (File)
Mon, Jan 13, 11:05 PM
Unknown Object (File)
Dec 5 2024, 7:18 PM
Unknown Object (File)
Nov 27 2024, 11:51 AM
Unknown Object (File)
Nov 25 2024, 5:44 PM

Details

Summary

Pointer arithmetic on a null pointer is undefined behavior.

The bug can be reproduced by running bin/sh/tests/builtins/wait6.0 with
UBSAN.

Test Plan

kyua test

Diff Detail

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