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
Unknown Object (File)
Thu, Nov 27, 6:57 PM
Unknown Object (File)
Wed, Nov 26, 2:26 AM
Unknown Object (File)
Tue, Nov 25, 10:24 PM
Unknown Object (File)
Fri, Nov 21, 11:07 AM
Unknown Object (File)
Thu, Nov 6, 11:04 AM
Unknown Object (File)
Mon, Nov 3, 9:37 AM
Unknown Object (File)
Oct 26 2025, 1:25 AM
Unknown Object (File)
Oct 10 2025, 8:07 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