fix other (potential) problems related
@@ -835,6 +835,10 @@ htparser_run(htparser * p, htparse_hooks * hooks, const char * data, size_t len)
HTP_SET_BUF(ch);
}
+ if (evhtp_unlikely(i + 1 >= len)) {
+ break;
+ }
+
ch = data[++i];
} while (i < len);
@@ -1319,6 +1323,10 @@ htparser_run(htparser * p, htparse_hooks * hooks, const char * data, size_t len)
break;
}
+ if (evhtp_unlikely(i + 1 >= len)) {
+ break;
+ }
+
ch = data[++i];
} while (i < len);
@@ -1734,6 +1742,10 @@ hdrline_start:
break;
}
+ if (evhtp_unlikely(i + 1 >= len)) {
+ break;
+ }
+
ch = data[++i];
} while (i < len);
