HomeFreeBSD

sh: Don't add something to a null pointer

Description

sh: Don't add something to a null pointer

Pointer arithmetic on a null pointer is undefined behavior.

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

Reported by: Mark Millard
Reviewed by: imp
Differential Revision: https://reviews.freebsd.org/D34011

Details

Provenance
jillesAuthored on Jan 23 2022, 9:15 PM
Reviewer
imp
Differential Revision
D34011: sh: Don't add something to a null pointer
Parents
rGddf312e8d756: tools/build: Fix the error message used when a host tool is not present
Branches
Unknown
Tags
Unknown