mirror of
https://github.com/MariaDB/server.git
synced 2026-05-02 13:15:32 +02:00
Merge neptunus.(none):/home/msvensson/mysql/mysql-5.0
into neptunus.(none):/home/msvensson/mysql/mysql-5.0-maint configure.in: Auto merged client/mysql.cc: Auto merged client/mysqldump.c: Auto merged mysql-test/mysql-test-run.pl: Auto merged mysql-test/r/date_formats.result: Auto merged mysql-test/r/federated.result: Auto merged mysql-test/r/func_time.result: Auto merged mysql-test/r/mysql.result: Auto merged mysql-test/r/type_ranges.result: Auto merged mysql-test/t/func_time.test: Auto merged mysql-test/t/mysql.test: Auto merged sql/field.cc: Auto merged sql/item_strfunc.cc: Auto merged sql/item_strfunc.h: Auto merged sql/item_subselect.cc: Auto merged sql/item_timefunc.cc: Auto merged sql/mysqld.cc: Auto merged sql/sql_class.h: Auto merged sql/sql_yacc.yy: Auto merged
This commit is contained in:
commit
1081dd6f0d
60 changed files with 614 additions and 58 deletions
|
|
@ -2968,6 +2968,16 @@ String *Item_func_uncompress::val_str(String *str)
|
|||
if (res->is_empty())
|
||||
return res;
|
||||
|
||||
/* If length is less than 4 bytes, data is corrupt */
|
||||
if (res->length() <= 4)
|
||||
{
|
||||
push_warning_printf(current_thd,MYSQL_ERROR::WARN_LEVEL_ERROR,
|
||||
ER_ZLIB_Z_DATA_ERROR,
|
||||
ER(ER_ZLIB_Z_DATA_ERROR));
|
||||
goto err;
|
||||
}
|
||||
|
||||
/* Size of uncompressed data is stored as first 4 bytes of field */
|
||||
new_size= uint4korr(res->ptr()) & 0x3FFFFFFF;
|
||||
if (new_size > current_thd->variables.max_allowed_packet)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue