Skip to content
Permalink
Browse files

OSdep: Fixed segmentation fault that happens with a malicious server …

…sending a negative length (Closes #16 on GitHub).

git-svn-id: http://svn.aircrack-ng.org/trunk@2419 28c6078b-6c39-48e3-add9-af49d547ecab
  • Loading branch information...
Mister-X- committed Oct 3, 2014
1 parent da08723 commit 88702a3ce4c28a973bf69023cd0312f412f6193e
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/osdep/network.c
@@ -131,7 +131,7 @@ int net_get(int s, void *arg, int *len)
if (!(plen <= *len))
printf("PLEN %d type %d len %d\n",
plen, nh.nh_type, *len);
assert(plen <= *len); /* XXX */
assert(plen <= *len && plen > 0); /* XXX */

*len = plen;
if ((*len) && (net_read_exact(s, arg, *len) == -1))

0 comments on commit 88702a3

Please sign in to comment.
You can’t perform that action at this time.