invalid calling parameters given to the ns_name_ntop() function.
Specifically, it detects if the caller passed a pointer and size pair
that causes the pointer to integer-wrap past zero. [ISC-Bugs #17737]
detected, rather than simply if a lease is noticed to have expired (which it
may have expired without a failover server noticing in some situations).
+- A patch supplied by David Cantrell at RedHat was applied that detects
+ invalid calling parameters given to the ns_name_ntop() function.
+ Specifically, it detects if the caller passed a pointer and size pair
+ that causes the pointer to integer-wrap past zero.
+
Changes since 4.1.0b1
- A missing "else" in dhcrelay.c could have caused an interface not to
*/
#ifndef lint
-static const char rcsid[] = "$Id: ns_name.c,v 1.2 2005/03/17 20:15:17 dhankins Exp $";
+static const char rcsid[] = "$Id: ns_name.c,v 1.3 2009/07/22 21:58:14 dhankins Exp $";
#endif
#include <sys/types.h>
dn = dst;
eom = dst + dstsiz;
+ if (dn >= eom) {
+ errno = EMSGSIZE;
+ return (-1);
+ }
+
while ((n = *cp++) != 0) {
if ((n & NS_CMPRSFLGS) != 0) {
/* Some kind of compression pointer. */