protect against malicious server trying to crash command-line client :)
This commit is contained in:
parent
5ebcb21f12
commit
275a9293e4
@ -1520,7 +1520,7 @@ You can turn off this feature to get a quicker startup with -A\n\n");
|
|||||||
j=0;
|
j=0;
|
||||||
while ((sql_field=mysql_fetch_field(fields)))
|
while ((sql_field=mysql_fetch_field(fields)))
|
||||||
{
|
{
|
||||||
sprintf(buf,"%s.%s",table_row[0],sql_field->name);
|
sprintf(buf,"%.64s.%.64s",table_row[0],sql_field->name);
|
||||||
field_names[i][j] = strdup_root(&hash_mem_root,buf);
|
field_names[i][j] = strdup_root(&hash_mem_root,buf);
|
||||||
add_word(&ht,field_names[i][j]);
|
add_word(&ht,field_names[i][j]);
|
||||||
field_names[i][num_fields+j] = strdup_root(&hash_mem_root,
|
field_names[i][num_fields+j] = strdup_root(&hash_mem_root,
|
||||||
@ -2526,7 +2526,7 @@ com_connect(String *buffer, char *line)
|
|||||||
{
|
{
|
||||||
sprintf(buff,"Connection id: %lu",mysql_thread_id(&mysql));
|
sprintf(buff,"Connection id: %lu",mysql_thread_id(&mysql));
|
||||||
put_info(buff,INFO_INFO);
|
put_info(buff,INFO_INFO);
|
||||||
sprintf(buff,"Current database: %s\n",
|
sprintf(buff,"Current database: %.128s\n",
|
||||||
current_db ? current_db : "*** NONE ***");
|
current_db ? current_db : "*** NONE ***");
|
||||||
put_info(buff,INFO_INFO);
|
put_info(buff,INFO_INFO);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user