mirror of
git://sourceware.org/git/glibc.git
synced 2025-04-18 14:30:43 +08:00
Add FreeBSD DoS patch.
This commit is contained in:
parent
86a04e000d
commit
bb46114429
@ -378,6 +378,7 @@ svctcp_recv(xprt, msg)
|
||||
cd->x_id = msg->rm_xid;
|
||||
return (TRUE);
|
||||
}
|
||||
cd->strm_stat = XPRT_DIED; /* XXXX */
|
||||
return (FALSE);
|
||||
}
|
||||
|
||||
|
@ -548,6 +548,12 @@ set_input_fragment(rstrm)
|
||||
return FALSE;
|
||||
header = ntohl(header);
|
||||
rstrm->last_frag = ((header & LAST_FRAG) == 0) ? FALSE : TRUE;
|
||||
/*
|
||||
* Sanity check. Try not to accept wildly incorrect
|
||||
* record sizes.
|
||||
*/
|
||||
if ((header & (~LAST_FRAG)) > rstrm->recvsize)
|
||||
return(FALSE);
|
||||
rstrm->fbtbc = header & ~LAST_FRAG;
|
||||
return TRUE;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user