summaryrefslogtreecommitdiff
path: root/dbug
diff options
context:
space:
mode:
authormsvensson@pilot.mysql.com <>2008-05-02 12:49:31 +0200
committermsvensson@pilot.mysql.com <>2008-05-02 12:49:31 +0200
commit4cede4a3bf0003f69aad46803930122e5c47f413 (patch)
tree7e730fdd0047d1420525d05df0620550ba3c2e20 /dbug
parentc1918b0464dcc4bc82cc1207b3a9189d3e7e2139 (diff)
downloadmariadb-git-4cede4a3bf0003f69aad46803930122e5c47f413.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
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++;