HomeFreeBSD

Change the test at the beginning of strncmp(), from being if (len - 1) < 0
rS191633Unpublished

Unpublished Commit ยท Learn More

No further details are available.

Description

Change the test at the beginning of strncmp(), from being if (len - 1) < 0
to if (len == 0).
The length is supposed to be unsigned, so len - 1 < 0 won't happen except
if len == 0 anyway, and it would return 0 when it shouldn't, if len was

INT_MAX.

Spotted out by: Channa <channa kad gmail com>

Details

Provenance
cognetAuthored on
Parents
rS191632: Sync with draft.
Branches
Unknown
Tags
Unknown

Event Timeline