OISF / libhtp

LibHTP is a security-aware parser for the HTTP protocol and the related bits and pieces.
BSD 3-Clause "New" or "Revised" License
289 stars 115 forks source link

memory leak #347

Open fyy-100 opened 2 years ago

fyy-100 commented 2 years ago

function: htp_mpart_part_handle_data line: part->parser->pending_header_line = bstr_add_mem(part->parser->pending_header_line, data, len);

if memory not enough, bstr_add_mem return NULL but not free part->parser->pending_header_line old memory

catenacyber commented 2 years ago

Thanks for this report, would you like to submit a fix ? Suricata does not use this part of libhtp (multipart parsing) What do you use libhtp for ?

fyy-100 commented 2 years ago

I try to use libhtp to instead of nginx with modsecurity :)