Project

General

Profile

Bug #133 » 0001-Do-not-invoke-libhtp-without-data-to-process.patch

Avoid passing zero length chunk to htplib - Pablo Rincon, 04/28/2010 03:00 PM

View differences:

src/app-layer-htp.c
int ret = 1;
HtpState *hstate = (HtpState *)htp_state;
if (input_len == 0)
SCReturnInt(1);
/* On the first invocation, create the connection parser structure to
* be used by HTP library. This is looked up via IP in the radix
* tree. Failing that, the default HTP config is used.
......
int r = -1;
int ret = 1;
if (input_len == 0)
SCReturnInt(1);
HtpState *hstate = (HtpState *)htp_state;
if (hstate->connp == NULL) {
SCLogError(SC_ERR_ALPARSER, "HTP state has no connp");
(2-2/3)