diff options
author | Henning Brauer <henning@cvs.openbsd.org> | 2004-05-04 19:56:19 +0000 |
---|---|---|
committer | Henning Brauer <henning@cvs.openbsd.org> | 2004-05-04 19:56:19 +0000 |
commit | 7b41fa724c8bfad34855bf69cd6beb25ea147d93 (patch) | |
tree | 9a5bae1f0e748b1fbbe461f44e436c3caca03ad7 /sbin/dhclient | |
parent | c68321044edc4842b248a843798a85b6a7694fcf (diff) |
use SIZE_T_MAX, canacar
Diffstat (limited to 'sbin/dhclient')
-rw-r--r-- | sbin/dhclient/privsep.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/sbin/dhclient/privsep.c b/sbin/dhclient/privsep.c index 685d7c62e90..0fb21656dee 100644 --- a/sbin/dhclient/privsep.c +++ b/sbin/dhclient/privsep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: privsep.c,v 1.5 2004/05/04 18:58:50 deraadt Exp $ */ +/* $OpenBSD: privsep.c,v 1.6 2004/05/04 19:56:18 henning Exp $ */ /* * Copyright (c) 2004 Henning Brauer <henning@openbsd.org> @@ -116,7 +116,7 @@ dispatch_imsg(int fd) error("corrupted message received"); buf_read(fd, &medium_len, sizeof(medium_len)); if (hdr.len < medium_len + sizeof(size_t) + sizeof(hdr) - + sizeof(size_t) || medium_len == UINT_MAX) + + sizeof(size_t) || medium_len == SIZE_T_MAX) error("corrupted message received"); if (medium_len > 0) { if ((medium = calloc(1, medium_len + 1)) == NULL) @@ -127,7 +127,7 @@ dispatch_imsg(int fd) buf_read(fd, &reason_len, sizeof(reason_len)); if (hdr.len < medium_len + reason_len + sizeof(hdr) || - reason_len == UINT_MAX) + reason_len == SIZE_T_MAX) error("corrupted message received"); if (reason_len > 0) { if ((reason = calloc(1, reason_len + 1)) == NULL) @@ -149,7 +149,7 @@ dispatch_imsg(int fd) buf_read(fd, &filename_len, sizeof(filename_len)); totlen += filename_len + sizeof(size_t); - if (hdr.len < totlen || filename_len == UINT_MAX) + if (hdr.len < totlen || filename_len == SIZE_T_MAX) error("corrupted message received"); if (filename_len > 0) { if ((filename = calloc(1, filename_len + 1)) == NULL) @@ -160,7 +160,7 @@ dispatch_imsg(int fd) buf_read(fd, &servername_len, sizeof(servername_len)); totlen += servername_len + sizeof(size_t); - if (hdr.len < totlen || servername_len == UINT_MAX) + if (hdr.len < totlen || servername_len == SIZE_T_MAX) error("corrupted message received"); if (servername_len > 0) { if ((servername = @@ -172,7 +172,7 @@ dispatch_imsg(int fd) buf_read(fd, &prefix_len, sizeof(prefix_len)); totlen += prefix_len; - if (hdr.len < totlen || prefix_len == UINT_MAX) + if (hdr.len < totlen || prefix_len == SIZE_T_MAX) error("corrupted message received"); if (prefix_len > 0) { if ((prefix = calloc(1, prefix_len + 1)) == NULL) @@ -190,7 +190,7 @@ dispatch_imsg(int fd) lease.options[i].len = optlen; if (optlen > 0) { totlen += optlen; - if (hdr.len < totlen || optlen == UINT_MAX) + if (hdr.len < totlen || optlen == SIZE_T_MAX) error("corrupted message received"); lease.options[i].data = calloc(1, optlen + 1); |