Bug#31752: check strmake() bounds

strmake() called with wrong parameters:
5.1-specific fixes.


sql/sql_db.cc:
  fix off-by-one buffer-length
This commit is contained in:
unknown 2007-11-26 09:38:42 +01:00
parent d7d7b10b53
commit 5ce7cdbe54

View File

@ -1387,7 +1387,7 @@ static void backup_current_db_name(THD *thd,
}
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;
}
}