]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
uniq(1): use strtonum to parse options
authorDaniel Tameling <tamelingdaniel@gmail.com>
Sat, 25 Feb 2023 17:25:51 +0000 (10:25 -0700)
committerDag-Erling Smørgrav <des@FreeBSD.org>
Wed, 17 Jan 2024 16:16:01 +0000 (17:16 +0100)
commit4cf7301e96833970cc42c6f75b8068eb51abdd37
tree0344545b25206d6f5999049625a3c532cb06a4f8
parent9c738c4bca57354f9f66ebde0c4b625fa6d6c743
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)
usr.bin/uniq/uniq.c