mirror of https://github.com/OISF/suricata
ftp: drop null checks from the response line free
SCFTPFreeResponseLine gated the release of the code buffer on a null test of the response pointer, so the code buffer had no check of its own. Neither check could fire: parse_response_line sets both pointers from Box::into_raw on a boxed slice, which never returns null, and C code obtains an FTPResponseLine only from SCFTPParseResponseLine. The comment on the code field claimed the pointer may be null; a line with no status code gets an empty buffer with code_length 0 instead. Remove both null checks, note why they are unnecessary, and correct the field comment. Ticket: 8803pull/16459/head
parent
2054e9bfcf
commit
db36f39632
Loading…
Reference in New Issue