[Date Prev][Date Next] [Chronological] [Thread] [Top]

(ITS#4503) lutil_atou*() functions misuse strtoul() API

Full_Name: Pierangelo Masarati
Version: HEAD,re23,re24
OS: irrelevant
URL: ftp://ftp.openldap.org/incoming/
Submission from: (NULL) (
Submitted by: ando

According to the man page, strtoul() returns (unsigned)(-1) when passed "-1"
(and so on).  This (weird?) behavior contrasts with the way it was used in
lutil_atou*() calls, where it was expected to barf in case of negative numbers.

This has now been fixed in HEAD; I need to check if other occurrences of direct
calls to strtoul() need to be fixed in the code.