Commit 10373a90 authored by serg@serg.mylan's avatar serg@serg.mylan

two buffer overflows fixed

parent 95adb083
...@@ -501,7 +501,7 @@ db_create_routine(THD *thd, int type, sp_head *sp) ...@@ -501,7 +501,7 @@ db_create_routine(THD *thd, int type, sp_head *sp)
else else
{ {
restore_record(table, s->default_values); // Get default values for fields restore_record(table, s->default_values); // Get default values for fields
strxmov(definer, thd->security_ctx->priv_user, "@", strxnmov(definer, sizeof(definer)-1, thd->security_ctx->priv_user, "@",
thd->security_ctx->priv_host, NullS); thd->security_ctx->priv_host, NullS);
if (table->s->fields != MYSQL_PROC_FIELD_COUNT) if (table->s->fields != MYSQL_PROC_FIELD_COUNT)
......
...@@ -1253,6 +1253,7 @@ pthread_handler_t handle_bootstrap(void *arg) ...@@ -1253,6 +1253,7 @@ pthread_handler_t handle_bootstrap(void *arg)
thd->version=refresh_version; thd->version=refresh_version;
thd->security_ctx->priv_user= thd->security_ctx->priv_user=
thd->security_ctx->user= (char*) my_strdup("boot", MYF(MY_WME)); thd->security_ctx->user= (char*) my_strdup("boot", MYF(MY_WME));
thd->security_ctx->priv_host[0]=0;
buff= (char*) thd->net.buff; buff= (char*) thd->net.buff;
thd->init_for_queries(); thd->init_for_queries();
......
...@@ -84,7 +84,7 @@ bool mysql_create_frm(THD *thd, const char *file_name, ...@@ -84,7 +84,7 @@ bool mysql_create_frm(THD *thd, const char *file_name,
uchar fileinfo[64],forminfo[288],*keybuff; uchar fileinfo[64],forminfo[288],*keybuff;
TYPELIB formnames; TYPELIB formnames;
uchar *screen_buff; uchar *screen_buff;
char buff[5]; char buff[32];
#ifdef WITH_PARTITION_STORAGE_ENGINE #ifdef WITH_PARTITION_STORAGE_ENGINE
partition_info *part_info= thd->lex->part_info; partition_info *part_info= thd->lex->part_info;
#endif #endif
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment