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)
Fri, Jan 24, 4:28 PM
Unknown Object (File)
Fri, Jan 24, 5:08 AM
Unknown Object (File)
Fri, Jan 24, 2:18 AM
Unknown Object (File)
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

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