Skip to content

Commit

Permalink
dhcp4: detect invalid length of address list on parsing (boo#918069)
Browse files Browse the repository at this point in the history
  • Loading branch information
wipawel committed Jul 1, 2015
1 parent 187dcab commit 3a77c6d
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions dhcp4/protocol.c
Expand Up @@ -1239,6 +1239,11 @@ ni_dhcp4_decode_csr(ni_buffer_t *bp, ni_route_array_t *routes)
static int
ni_dhcp4_decode_address_list(ni_buffer_t *bp, ni_string_array_t *list)
{
if (ni_buffer_count(bp) % 4) {
bp->underflow = 1;
return -1;
}

while (ni_buffer_count(bp) && !bp->underflow) {
struct in_addr addr;

Expand Down

0 comments on commit 3a77c6d

Please sign in to comment.