Fixed memory overrun in mysql_tzinfo_to_sql
This commit is contained in:
parent
e2962ee07e
commit
73f78f7766
@ -214,7 +214,7 @@ tz_load(const char *name, TIME_ZONE_INFO *sp, MEM_ROOT *storage)
|
||||
ALIGN_SIZE(sp->typecnt *
|
||||
sizeof(TRAN_TYPE_INFO)) +
|
||||
#ifdef ABBR_ARE_USED
|
||||
ALIGN_SIZE(sp->charcnt) +
|
||||
ALIGN_SIZE(sp->charcnt+1) +
|
||||
#endif
|
||||
sp->leapcnt * sizeof(LS_INFO))))
|
||||
return 1;
|
||||
@ -227,7 +227,7 @@ tz_load(const char *name, TIME_ZONE_INFO *sp, MEM_ROOT *storage)
|
||||
tzinfo_buf+= ALIGN_SIZE(sp->typecnt * sizeof(TRAN_TYPE_INFO));
|
||||
#ifdef ABBR_ARE_USED
|
||||
sp->chars= tzinfo_buf;
|
||||
tzinfo_buf+= ALIGN_SIZE(sp->charcnt);
|
||||
tzinfo_buf+= ALIGN_SIZE(sp->charcnt+1);
|
||||
#endif
|
||||
sp->lsis= (LS_INFO *)tzinfo_buf;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user