diff options
author | unknown <msvensson@pilot.mysql.com> | 2008-05-02 12:49:31 +0200 |
---|---|---|
committer | unknown <msvensson@pilot.mysql.com> | 2008-05-02 12:49:31 +0200 |
commit | 7f5119d3e574134f952b612843bbd374f9bba2e3 (patch) | |
tree | 7e730fdd0047d1420525d05df0620550ba3c2e20 /dbug/dbug.c | |
parent | cde8f109b90aa5d6344a598bd2d14348a03c36d5 (diff) | |
download | mariadb-git-7f5119d3e574134f952b612843bbd374f9bba2e3.tar.gz |
Bug#35986 valgrind warning in DbugParse for empty string in SET GLOBAL DEBUG=""
- Code in DbugParse was reading from beyond end of the control string
dbug/dbug.c:
Don't try to parse control strings that hasn't got any tokens
or is zero size
Diffstat (limited to 'dbug/dbug.c')
-rw-r--r-- | dbug/dbug.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/dbug/dbug.c b/dbug/dbug.c index 09515dc329c..baf080f5e27 100644 --- a/dbug/dbug.c +++ b/dbug/dbug.c @@ -493,7 +493,7 @@ static void DbugParse(CODE_STATE *cs, const char *control) } end= DbugStrTok(control); - while (1) + while (control < end) { int c, sign= (*control == '+') ? 1 : (*control == '-') ? -1 : 0; if (sign) control++; |