-
Nirbhay Choubey authored
DEBUG BUILD An embedded-mysql application can crash in debug mode with 'stack smashing detected' error when it tries to connect without specifying the user name (NULL). The problem lies in the length of the buffer (array) allocated to store user name in mysql_real_connect function. This length did not take into consideration an extra byte that strmake requires in order to store either '\0' or 'Z' in debug mode (for padding empty bytes). Fixed by increasing the name buffer length by 1.
Nirbhay Choubey authoredDEBUG BUILD An embedded-mysql application can crash in debug mode with 'stack smashing detected' error when it tries to connect without specifying the user name (NULL). The problem lies in the length of the buffer (array) allocated to store user name in mysql_real_connect function. This length did not take into consideration an extra byte that strmake requires in order to store either '\0' or 'Z' in debug mode (for padding empty bytes). Fixed by increasing the name buffer length by 1.
Loading