8e0267
From: Simon Kelley <simon@thekelleys.org.uk>
8e0267
Date: Wed, 14 Aug 2019 20:52:50 +0000 (+0100)
8e0267
Subject: Fix breakage of dhcp_lease_time utility.
8e0267
X-Git-Url: http://thekelleys.org.uk/gitweb/?p=dnsmasq.git;a=commitdiff_plain;h=225accd235a09413ca253e710d7d691a3475c523
8e0267
8e0267
Fix breakage of dhcp_lease_time utility.
8e0267
---
8e0267
8e0267
diff --git a/contrib/lease-tools/dhcp_lease_time.c b/contrib/lease-tools/dhcp_lease_time.c
8e0267
index 697d627..91edbfa 100644
8e0267
--- a/contrib/lease-tools/dhcp_lease_time.c
8e0267
+++ b/contrib/lease-tools/dhcp_lease_time.c
8e0267
@@ -83,7 +83,7 @@ static unsigned char *option_find1(unsigned char *p, unsigned char *end, int opt
8e0267
           if (p >= end - 2)
8e0267
             return NULL; /* malformed packet */
8e0267
           opt_len = option_len(p);
8e0267
-          if (end - p >= (2 + opt_len))
8e0267
+          if (end - p < (2 + opt_len))
8e0267
             return NULL; /* malformed packet */
8e0267
           if (*p == opt && opt_len >= minsize)
8e0267
             return p;
8e0267