diff options
Diffstat (limited to 'myisam')
-rw-r--r-- | myisam/mi_packrec.c | 6 | ||||
-rw-r--r-- | myisam/myisampack.c | 2 |
2 files changed, 7 insertions, 1 deletions
diff --git a/myisam/mi_packrec.c b/myisam/mi_packrec.c index 7557bb8749f..1bd39aa900b 100644 --- a/myisam/mi_packrec.c +++ b/myisam/mi_packrec.c @@ -743,6 +743,12 @@ static void uf_blob(MI_COLUMNDEF *rec, MI_BIT_BUFF *bit_buff, { ulong length=get_bits(bit_buff,rec->space_length_bits); uint pack_length=(uint) (end-to)-mi_portable_sizeof_char_ptr; + if (bit_buff->blob_pos+length > bit_buff->end) + { + bit_buff->error=1; + bzero((byte*) to,(end-to)); + return; + } decode_bytes(rec,bit_buff,bit_buff->blob_pos,bit_buff->blob_pos+length); _my_store_blob_length((byte*) to,pack_length,length); memcpy_fixed((char*) to+pack_length,(char*) &bit_buff->blob_pos, diff --git a/myisam/myisampack.c b/myisam/myisampack.c index 4fc84ac5657..800203a30e2 100644 --- a/myisam/myisampack.c +++ b/myisam/myisampack.c @@ -243,7 +243,7 @@ static struct my_option my_long_options[] = {"debug", '#', "Output debug log. Often this is 'd:t:o,filename'", 0, 0, 0, GET_STR, OPT_ARG, 0, 0, 0, 0, 0, 0}, {"force", 'f', - "Force packing of table even if it gets bigger or if tempfile exists.", + "Force packing of table even if it gets bigger or if tempfile exists.", 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0}, {"join", 'j', "Join all given tables into 'new_table_name'. All tables MUST have identical layouts.", |