Fixed bug #41686 (ipv4 ip_reass() crash error) introduced some months ago while fixing bug #41041...

This commit is contained in:
Simon Goldschmidt 2014-05-19 22:07:57 +02:00
parent c3ac875055
commit c18abd4fbe

View File

@ -595,9 +595,13 @@ ip_reass(struct pbuf *p)
}
/* find the previous entry in the linked list */
for (ipr_prev = reassdatagrams; ipr_prev != NULL; ipr_prev = ipr_prev->next) {
if (ipr_prev->next == ipr) {
break;
if (ipr == reassdatagrams_ipv4) {
ipr_prev = NULL;
} else {
for (ipr_prev = reassdatagrams; ipr_prev != NULL; ipr_prev = ipr_prev->next) {
if (ipr_prev->next == ipr) {
break;
}
}
}