Browse Source
Bug #20778: strange characters in warning message 1366 when called in SP
Bug #20778: strange characters in warning message 1366 when called in SP
The function receives an exactly-sized buffer (not a C NUL-terminated string) and passes it into a printf function to be interpreted with "%s". Instead, create an intermediate String object, and copy the data into it, and pass in a pointer to the String's NUL-terminated buffer. mysql-test/r/warnings.result: Test that warnings do not read outside its intended memory space. mysql-test/t/warnings.test: Test that warnings do not read outside its intended memory space. sql/field.cc: Create a new String object and use a pointer to its data instead of the exactly-sized buffer to be interpreted as a C string deep within the errmsg.txt list via printf.pull/374/head
3 changed files with 127 additions and 3 deletions
Write
Preview
Loading…
Cancel
Save
Reference in new issue