diff options
author | Michael Widenius <monty@askmonty.org> | 2011-05-26 18:35:26 +0300 |
---|---|---|
committer | Michael Widenius <monty@askmonty.org> | 2011-05-26 18:35:26 +0300 |
commit | 73f78f77667f22020a9497b329abaa89fc82ba17 (patch) | |
tree | 30a7bebb3f5a5414bd87ad3f30eda42fddd3520c /sql | |
parent | e2962ee07ee0e961f573e53e310dfa2465732d3b (diff) | |
download | mariadb-git-73f78f77667f22020a9497b329abaa89fc82ba17.tar.gz |
Fixed memory overrun in mysql_tzinfo_to_sql
Diffstat (limited to 'sql')
-rw-r--r-- | sql/tztime.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sql/tztime.cc b/sql/tztime.cc index 25b3b0c8994..678483e1c14 100644 --- a/sql/tztime.cc +++ b/sql/tztime.cc @@ -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; |