1106. [bug] After seeing an out of range TTL, nsupdate would
treat all TTLs as out of range. [RT #2001]
+1106. [bug] After seeing an out of range TTL, nsupdate would
+ treat all TTLs as out of range. [RT #2001]
--- 9.2.0rc9 released ---
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: nsupdate.c,v 1.103.2.4 2001/10/15 20:25:57 gson Exp $ */
+/* $Id: nsupdate.c,v 1.103.2.5 2001/11/06 20:42:01 gson Exp $ */
#include <config.h>
goto doneparsing;
}
}
+ errno = 0;
ttl = strtol(word, &endp, 0);
if (*endp != '\0') {
if (isdelete) {
if (isdelete)
ttl = 0;
- else if (ttl < 0 || ttl > TTL_MAX || errno == ERANGE) {
+ else if (ttl < 0 || ttl > TTL_MAX ||
+ (ttl == LONG_MAX && errno == ERANGE))
+ {
/*
* The errno test is needed to catch when strtol()
* overflows on a platform where sizeof(int) ==