From: Philippe Antoine Date: Thu, 15 Sep 2022 13:26:46 +0000 (+0200) Subject: test: do not output non ascii character X-Git-Tag: suricata-7.0.0-rc1~69 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b281199e9aa1d2d66ac35d1f53358afca8c44a13;p=thirdparty%2Fsuricata.git test: do not output non ascii character 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 --- diff --git a/src/detect-content.c b/src/detect-content.c index c4f0a17a3f..e3d1cb478e 100644 --- a/src/detect-content.c +++ b/src/detect-content.c @@ -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) {