Bug#31752: check strmake() bounds

strmake() called with wrong parameters:
5.1-specific fixes.
parent 72cd3636
...@@ -1387,7 +1387,7 @@ static void backup_current_db_name(THD *thd, ...@@ -1387,7 +1387,7 @@ static void backup_current_db_name(THD *thd,
} }
else else
{ {
strmake(saved_db_name->str, thd->db, saved_db_name->length); strmake(saved_db_name->str, thd->db, saved_db_name->length - 1);
saved_db_name->length= thd->db_length; saved_db_name->length= thd->db_length;
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment