diff options
author | 1999-09-13 07:14:13 +0000 | |
---|---|---|
committer | 1999-09-13 07:14:13 +0000 | |
commit | 26132b66e4713971e7a3d2892db64d88f4dda112 (patch) | |
tree | ba9c649523de007da66274bd438441c82b33bacc | |
parent | Fix rootdev handling, use disk checksums to find the device we were booted (diff) | |
download | wireguard-openbsd-26132b66e4713971e7a3d2892db64d88f4dda112.tar.xz wireguard-openbsd-26132b66e4713971e7a3d2892db64d88f4dda112.zip |
use stronger language when pointing people at strtol()
-rw-r--r-- | lib/libc/stdlib/atoi.3 | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/lib/libc/stdlib/atoi.3 b/lib/libc/stdlib/atoi.3 index fa7b84e95c9..80831bdd2fa 100644 --- a/lib/libc/stdlib/atoi.3 +++ b/lib/libc/stdlib/atoi.3 @@ -33,7 +33,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $OpenBSD: atoi.3,v 1.3 1999/06/29 18:36:18 aaron Exp $ +.\" $OpenBSD: atoi.3,v 1.4 1999/09/13 07:14:13 deraadt Exp $ .\" .Dd June 4, 1993 .Dt ATOI 3 @@ -60,6 +60,17 @@ It is equivalent to: .Bd -literal -offset indent (int)strtol(nptr, (char **)NULL, 10); .Ed +.Sh CAVEATS +.Nm +does no overflow checking, handles unsigned numbers poorly, +and handles strings containing trailing extra characters +(like +.Dq "123abc" Ns ) +poorly. Careful use of +.Xr strtol 3 +and +.Xr strtoul 3 +can alleviate these problems. .Sh SEE ALSO .Xr atof 3 , .Xr atol 3 , |