Commit d58b0523 authored by Rich Prohaska's avatar Rich Prohaska

#57 error our unpack_blobs if the blobs input buffer can not be parsed

parent e264e0e9
......@@ -2460,12 +2460,23 @@ int ha_tokudb::unpack_blobs(
false;
Field* field = table->field[curr_field_index];
uint32_t len_bytes = field->row_pack_length();
buff = unpack_toku_field_blob(
const uchar* end_buff = unpack_toku_field_blob(
record + field_offset(field, table),
buff,
len_bytes,
skip
);
// verify that the pointers to the blobs are all contained within the blob_buff
if (!(blob_buff <= buff && end_buff <= blob_buff + num_bytes)) {
error = -3000000;
goto exit;
}
buff = end_buff;
}
// verify that the entire blob buffer was parsed
if (share->kc_info.num_blobs > 0 && !(num_bytes > 0 && buff == blob_buff + num_bytes)) {
error = -4000000;
goto exit;
}
error = 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment