]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: cfgparse: Improve error message for invalid \x sequences
authorTim Duesterhus <tim@bastelstu.be>
Thu, 7 May 2020 17:24:20 +0000 (19:24 +0200)
committerWilly Tarreau <w@1wt.eu>
Thu, 7 May 2020 20:46:26 +0000 (22:46 +0200)
This patch states the invalid \x sequence within the error message.

src/cfgparse.c

index 5815da0a9d60d72d044f3b85d7629b1e80060a56..63e150f38821115adf7fc8561b38c777844e5ab2 100644 (file)
@@ -1965,7 +1965,7 @@ next_line:
                                                skip = 3;
                                        }
                                        else {
-                                               ha_alert("parsing [%s:%d] : invalid or incomplete '\\x' sequence in '%s'.\n", file, linenum, args[0]);
+                                               ha_alert("parsing [%s:%d] : invalid or incomplete '\\x' sequence '%.*s' in '%s'.\n", file, linenum, 4, line, args[0]);
                                                err_code |= ERR_ALERT | ERR_FATAL;
                                                goto next_line;
                                        }