diff options
author | Toni <matzeton@googlemail.com> | 2022-08-24 11:24:25 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-08-24 11:24:25 +0200 |
commit | e135c1c5e3a6b202f4b29374426bbc9808978045 (patch) | |
tree | c3c0a1a992d093642055c029b71cbcd2e336f2b5 /src/lib/protocols/http.c | |
parent | 30730e95e5a270cb70dd5509fa6e481a7ed4e074 (diff) | |
parent | ac0d7ccb7e6ee1a9b67f07822dad66617d5ff75b (diff) |
Merge pull request #1712 from IvanNardi/oss-fuzzer
HTTP, SoftEther, Florensia: fix some memory corruptions
Diffstat (limited to 'src/lib/protocols/http.c')
-rw-r--r-- | src/lib/protocols/http.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/lib/protocols/http.c b/src/lib/protocols/http.c index a562aa03e..6fe6cab33 100644 --- a/src/lib/protocols/http.c +++ b/src/lib/protocols/http.c @@ -855,7 +855,8 @@ static void check_content_type_and_change_protocol(struct ndpi_detection_module_ /* Matching on Content-Type. OCSP: application/ocsp-request, application/ocsp-response */ - if(strncmp((const char *)packet->content_line.ptr, "application/ocsp-", 17) == 0) { + if(packet->content_line.len > 17 && + strncmp((const char *)packet->content_line.ptr, "application/ocsp-", 17) == 0) { NDPI_LOG_DBG2(ndpi_struct, "Found OCSP\n"); ndpi_set_detected_protocol(ndpi_struct, flow, NDPI_PROTOCOL_OCSP, NDPI_PROTOCOL_HTTP, NDPI_CONFIDENCE_DPI); } |