ftp: completely resets port_line

In the case port_line is first allocated and port_line_len is set,
Then a second request reaches memcap and frees port_line,
port_line_len should also be reset, because both will get used
by the response parsing.

Ticket: #5701
pull/8390/head
Philippe Antoine 2 years ago committed by Victor Julien
parent 0632233791
commit 1660172a8b

@ -645,6 +645,7 @@ static AppLayerResult FTPParseRequest(Flow *f, void *ftp_state, AppLayerParserSt
FTPFree(state->port_line, state->port_line_size);
state->port_line = NULL;
state->port_line_size = 0;
state->port_line_len = 0;
}
SCReturnStruct(APP_LAYER_OK);
}

Loading…
Cancel
Save