if (packet->auth_data == NULL) {
packet->auth_data_len = 0;
}
+ if (packet->auth_data_len > 0xFF) {
+ const char * const msg = "Authentication data too long. "
+ "Won't fit into the buffer and will be truncated. Authentication will thus fail";
+ SET_CLIENT_ERROR(*conn->error_info, CR_UNKNOWN_ERROR, UNKNOWN_SQLSTATE, msg);
+ php_error_docref(NULL TSRMLS_CC, E_WARNING, msg);
+ DBG_RETURN(0);
+ }
+
int1store(p, packet->auth_data_len);
++p;
/*!!!!! is the buffer big enough ??? */