mirror of
https://github.com/MariaDB/server.git
synced 2025-12-24 11:21:21 +03:00
Bug #52304 valgrind does not like to print un-inited string in Protocol_text::store()
The reason of the failure was apparent flaw in that a pointer to an uninitialized buffer was passed to DBUG_PRINT of Protocol_text::store(). Fixed with splitting the print-out into two branches: one with length zero of the problematic arg and the rest.
This commit is contained in:
@@ -850,7 +850,7 @@ bool Protocol_text::store(const char *from, size_t length,
|
||||
CHARSET_INFO *tocs= this->thd->variables.character_set_results;
|
||||
#ifndef DBUG_OFF
|
||||
DBUG_PRINT("info", ("Protocol_text::store field %u (%u): %s", field_pos,
|
||||
field_count, from));
|
||||
field_count, (length == 0? "" : from)));
|
||||
DBUG_ASSERT(field_pos < field_count);
|
||||
DBUG_ASSERT(field_types == 0 ||
|
||||
field_types[field_pos] == MYSQL_TYPE_DECIMAL ||
|
||||
|
||||
Reference in New Issue
Block a user