Skip to content

Commit

Permalink
Fix breakage of dhcp_lease_time utility.
Browse files Browse the repository at this point in the history
  • Loading branch information
simonkelley committed Aug 14, 2019
1 parent ab73a74 commit 225accd
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,10 @@ version 2.81
the DHCP server in subnets where the server (or relay) doesn't
have an interface on the network in that subnet. Many thanks to
kamp.de for sponsoring this feature.

Fix broken contrib/lease_tools/dhcp_lease_time.c. A packet
validation check got borked in commit 2b38e382 and release 2.80.
Thanks to Tomasz Szajner for spotting this.


version 2.80
Expand Down
2 changes: 1 addition & 1 deletion contrib/lease-tools/dhcp_lease_time.c
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ static unsigned char *option_find1(unsigned char *p, unsigned char *end, int opt
if (p >= end - 2)
return NULL; /* malformed packet */
opt_len = option_len(p);
if (end - p >= (2 + opt_len))
if (end - p < (2 + opt_len))
return NULL; /* malformed packet */
if (*p == opt && opt_len >= minsize)
return p;
Expand Down

0 comments on commit 225accd

Please sign in to comment.