summaryrefslogtreecommitdiff
path: root/dbug
diff options
context:
space:
mode:
authorunknown <msvensson@pilot.mysql.com>2008-05-02 12:49:31 +0200
committerunknown <msvensson@pilot.mysql.com>2008-05-02 12:49:31 +0200
commit7f5119d3e574134f952b612843bbd374f9bba2e3 (patch)
tree7e730fdd0047d1420525d05df0620550ba3c2e20 /dbug
parentcde8f109b90aa5d6344a598bd2d14348a03c36d5 (diff)
downloadmariadb-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')
-rw-r--r--dbug/dbug.c2
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++;