|
|
|
@ -266,8 +266,9 @@ int DetectPcrePayloadMatch(DetectEngineThreadCtx *det_ctx, const Signature *s,
|
|
|
|
capture_len = (capture_len < 0xffff) ? (uint16_t)capture_len : 0xffff;
|
|
|
|
capture_len = (capture_len < 0xffff) ? (uint16_t)capture_len : 0xffff;
|
|
|
|
uint8_t *str_ptr2 = SCMalloc(capture_len);
|
|
|
|
uint8_t *str_ptr2 = SCMalloc(capture_len);
|
|
|
|
if (unlikely(str_ptr2 == NULL)) {
|
|
|
|
if (unlikely(str_ptr2 == NULL)) {
|
|
|
|
pcre2_substring_free((PCRE2_UCHAR8 *)pcre2_str_ptr);
|
|
|
|
SCFree(str_ptr);
|
|
|
|
continue;
|
|
|
|
pcre2_substring_free((PCRE2_UCHAR8 *)pcre2_str_ptr2);
|
|
|
|
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
memcpy(str_ptr2, pcre2_str_ptr2, capture_len);
|
|
|
|
memcpy(str_ptr2, pcre2_str_ptr2, capture_len);
|
|
|
|
pcre2_substring_free((PCRE2_UCHAR8 *)pcre2_str_ptr2);
|
|
|
|
pcre2_substring_free((PCRE2_UCHAR8 *)pcre2_str_ptr2);
|
|
|
|
|