From: Victor Julien Date: Mon, 16 Sep 2013 13:26:49 +0000 (+0200) Subject: Coverity 1038111: fix local overrun of a string in app layer proto detect setup code. X-Git-Tag: suricata-2.0beta2~372 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=7f140f6726d2794a7a8e9278f5ec3074370eec4c;p=thirdparty%2Fsuricata.git Coverity 1038111: fix local overrun of a string in app layer proto detect setup code. --- 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));