HomeFreeBSD

uniq(1): use strtonum to parse options

Description

uniq(1): use strtonum to parse options

Previously strtol was used and the result was directly cast to an int
without checking for an overflow. Use strtonum instead since it is
safer and tells us what went wrong.

Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/643

(cherry picked from commit e052829e3e16dfd82d0adcbb69fd0e30f47a3a6c)

Details

Provenance
tamelingdaniel_gmail.comAuthored on Feb 25 2023, 5:25 PM
desCommitted on Jan 17 2024, 4:16 PM
Parents
rG9c738c4bca57: login: Use getpwnam_r() instead of getpwnam().
Branches
Unknown
Tags
Unknown