Fixed queuing of extended segments

This commit is contained in:
M66B 2019-03-04 08:23:21 +00:00
parent cd178a3630
commit c192277915
1 changed files with 7 additions and 1 deletions

View File

@ -999,13 +999,19 @@ void queue_tcp(const struct arguments *args,
s->seq - cur->remote_start, s->seq + s->len - cur->remote_start,
s->seq + datalen - cur->remote_start);
free(s->data);
s->len = datalen;
s->data = malloc(datalen);
memcpy(s->data, data, datalen);
} else
} else {
log_android(ANDROID_LOG_ERROR, "%s segment larger %u..%u < %u",
session,
s->seq - cur->remote_start, s->seq + s->len - cur->remote_start,
s->seq + datalen - cur->remote_start);
free(s->data);
s->len = datalen;
s->data = malloc(datalen);
memcpy(s->data, data, datalen);
}
}
}
}