-
unknown authored
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.
033db2d0