diff options
author | Aleksey Midenkov <midenok@gmail.com> | 2016-09-20 15:41:38 +0000 |
---|---|---|
committer | Sergey Vojtovich <svoj@mariadb.org> | 2017-11-29 15:13:35 +0400 |
commit | 51b30586ea999744de6a15146257f2976825781e (patch) | |
tree | 8d053794a75b8ac7c2f2d4c28925d607ad3d0cb5 /sql/table.cc | |
parent | 0c6ff122fa080f80c461f77585176c25c284e33d (diff) | |
download | mariadb-git-51b30586ea999744de6a15146257f2976825781e.tar.gz |
FRM: fail to load extra2 option with size 1 fix
From comment in unreg.h:
Types of values in the MariaDB extra2 frm segment.
Each value is written as
type: 1 byte
length: 1 byte (1..255) or \0 and 2 bytes.
binary value of the 'length' bytes.
length == 1 is valid.
Diffstat (limited to 'sql/table.cc')
-rw-r--r-- | sql/table.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sql/table.cc b/sql/table.cc index 985ca800633..220112f93ed 100644 --- a/sql/table.cc +++ b/sql/table.cc @@ -1221,7 +1221,7 @@ int TABLE_SHARE::init_from_binary_frm_image(THD *thd, bool write, if (*extra2 != '/') // old frm had '/' there { const uchar *e2end= extra2 + len; - while (extra2 + 3 < e2end) + while (extra2 + 3 <= e2end) { uchar type= *extra2++; size_t length= *extra2++; |