Skip to content

Commit

Permalink
Merge pull request #603 from NickSampanis/603
Browse files Browse the repository at this point in the history
Fix nbns arbitary length heap overflow
  • Loading branch information
LocutusOfBorg committed Dec 16, 2014
2 parents 6a3fc7f + 3f0c582 commit f6e452e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions plug-ins/nbns_spoof/nbns_spoof.c
Original file line number Diff line number Diff line change
Expand Up @@ -390,6 +390,10 @@ static void nbns_spoof(struct packet_object *po)

SAFE_CALLOC(response, NBNS_MSGLEN_QUERY_RESPONSE, sizeof(u_char));

if (po->DATA.len > 70) {
SAFE_FREE(response);
return;
}
memset(response, 0, NBNS_MSGLEN_QUERY_RESPONSE);

memcpy(response, po->DATA.data, po->DATA.len);
Expand Down

0 comments on commit f6e452e

Please # to comment.