From 7f140f6726d2794a7a8e9278f5ec3074370eec4c Mon Sep 17 00:00:00 2001 From: Victor Julien Date: Mon, 16 Sep 2013 15:26:49 +0200 Subject: [PATCH] Coverity 1038111: fix local overrun of a string in app layer proto detect setup code. --- src/detect-content.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/detect-content.c b/src/detect-content.c index e2d1a95dec..c124c44ff1 100644 --- a/src/detect-content.c +++ b/src/detect-content.c @@ -270,7 +270,7 @@ DetectContentData *DetectContentParse (char *contentstr) DetectContentData *DetectContentParseEncloseQuotes(char *contentstr) { - char str[strlen(contentstr) + 2]; + char str[strlen(contentstr) + 3]; // 2 for quotes, 1 for \0 str[0] = '\"'; memcpy(str + 1, contentstr, strlen(contentstr)); -- 2.47.3