]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
test: do not output non ascii character 8444/head
authorPhilippe Antoine <pantoine@oisf.net>
Thu, 15 Sep 2022 13:26:46 +0000 (15:26 +0200)
committerVictor Julien <vjulien@oisf.net>
Wed, 25 Jan 2023 11:32:06 +0000 (12:32 +0100)
The unit test for content |aa bz| transforms in place the string
str to replace the 2 characters aa by one character 0xaa
Then, when z is not recognized as a valid hexadeicmal character,
the whole modified string is printed out, inclusing the non-ascii
0xaa

Ticket: #5558

src/detect-content.c

index c4f0a17a3fd25aacec9d427b11123693157cbeb3..e3d1cb478e5bf0b50bfb639d4eca85d37d67d37d 100644 (file)
@@ -151,7 +151,7 @@ int DetectContentDataParse(const char *keyword, const char *contentstr,
                     else if (str[i] != ',') {
                         SCLogError("Invalid hex code in "
                                    "content - %s, hex %c. Invalidating signature.",
-                                str, str[i]);
+                                contentstr, str[i]);
                         goto error;
                     }
                 } else if (escape) {