]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
[MINOR] cfgparse: fix off-by 2 in error message size
authorJeffrey 'jf' Lim <jfs.world@gmail.com>
Sat, 4 Oct 2008 16:07:00 +0000 (18:07 +0200)
committerWilly Tarreau <w@1wt.eu>
Sun, 7 Dec 2008 22:37:15 +0000 (23:37 +0100)
was just looking through the source, and noticed this... :)
(cherry picked from commit 63b76be713784f487e8d0c859a85513642fe7bdc)
(cherry picked from commit a801db6c5ea750f93a3795dbb2e70c03e05bbef4)

src/cfgparse.c

index a5f49acb8355fa1c146e7d4d714e6ce4eecc6fff..5394b6bc4b1e0ac68c29ea2a22709c307430f748 100644 (file)
@@ -1622,7 +1622,7 @@ int cfg_parse_listen(const char *file, int linenum, char **args, int inv)
                if (warnifnotcap(curproxy, PR_CAP_BE, file, linenum, args[0], NULL))
                        return 0;
 
-               memcpy(trash, "error near 'balance'", 19);
+               memcpy(trash, "error near 'balance'", 21);
                if (backend_parse_balance((const char **)args + 1, trash, sizeof(trash), curproxy) < 0) {
                        Alert("parsing [%s:%d] : %s\n", file, linenum, trash);
                        return -1;