HomeFreeBSD

sh: Fix some arithmetic undefined behaviour.

Description

sh: Fix some arithmetic undefined behaviour.

Fix shifts of possibly negative numbers found with ubsan and avoid signed
integer overflow when hashing an extremely long command name.

MFC after: 1 week

Details

Provenance
jillesAuthored on
Parents
rS284778: MFC r284237,284277:
Branches
Unknown
Tags
Unknown