]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
detect/http: report error on alloc failure 10350/head 10355/head
authorVictor Julien <vjulien@oisf.net>
Fri, 9 Feb 2024 07:09:38 +0000 (08:09 +0100)
committerShivani Bhardwaj <shivanib134@gmail.com>
Fri, 9 Feb 2024 14:11:46 +0000 (19:41 +0530)
(cherry picked from commit 7e4dba7dfbd063be554b6145b747d7879eaa1f84)

src/detect-http-header.c

index 8a7838042821a25a2b7dd3276d9dfbbdc365e790..cd36ea597cd55878d30ec501bc758b750146e943 100644 (file)
@@ -603,6 +603,8 @@ static void *HttpMultiBufHeaderThreadDataInit(void *data)
 
     /* This return value check to satisfy our Cocci malloc checks. */
     if (td == NULL) {
+        SCLogError("failed to allocate %" PRIuMAX " bytes: %s", (uintmax_t)sizeof(*td),
+                strerror(errno));
         return NULL;
     }
     return td;