Out of range numeric handling
In a similar way than OpenBSD, the numeric values overflows are checked.
Updated by dclink almost 7 years ago
- File patch-atoi.txt patch-atoi.txt added
- Subject changed from Sysctl out of range numeric handling to Out of range numeric handling
- Category changed from Kernel to Userland
Finally made more out of range handling in some base utilities. For example vi with a wrong COLUMNS env var led to segmentation fault. Ported small fixes in ifconfig 80211 part from FreeBSD (use of d value instead of atoi(val) when it was necessary) and so on.
Updated by tuxillo over 6 years ago
- Assignee set to tuxillo
- % Done changed from 100 to 0
The patch looks okay besides a few wrong tabs which is really minor.
But I'd like to understand why you don't use strtonum() more consistently, for example you use strtol() and an ERANGE check in some other places: