projects
/
oweals
/
busybox.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f9beeb2
)
udhcpc: check read of overload option data byte to be within packet
author
Denys Vlasenko
<vda.linux@googlemail.com>
Tue, 25 Oct 2016 12:25:52 +0000
(14:25 +0200)
committer
Denys Vlasenko
<vda.linux@googlemail.com>
Tue, 25 Oct 2016 12:26:36 +0000
(14:26 +0200)
function old new delta
udhcp_get_option 220 225 +5
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
networking/udhcp/common.c
patch
|
blob
|
history
diff --git
a/networking/udhcp/common.c
b/networking/udhcp/common.c
index 589bcd674986cb84aae26fbb112c18168b21be12..1aaf5255c80484bc1103be9732c7e592ea589726 100644
(file)
--- a/
networking/udhcp/common.c
+++ b/
networking/udhcp/common.c
@@
-268,7
+268,8
@@
uint8_t* FAST_FUNC udhcp_get_option(struct dhcp_packet *packet, int code)
}
if (optionptr[OPT_CODE] == DHCP_OPTION_OVERLOAD) {
- overload |= optionptr[OPT_DATA];
+ if (len >= 3)
+ overload |= optionptr[OPT_DATA];
/* fall through */
}
optionptr += len;