Skip to content

Commit

Permalink
Bug #34173425 Assertion failure: mtr0log.cc:NNN:n_inst > 0 thread NNN
Browse files Browse the repository at this point in the history
Problem:
    read_2_bytes may return nullptr if ptr exceeds end_ptr. Any calls to
read_2_bytes must check if nullptr is returned.

Solution:
    Updated all instances where this check is required. Verified other
call sites as well

Change-Id: I5d9b2e737c94f83626b625342f36366838544021
  • Loading branch information
ram1048 authored and bjornmu committed Jun 29, 2022
1 parent 36c295e commit 9729eb3
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions storage/innobase/mtr/mtr0log.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1313,6 +1313,7 @@ static byte *parse_index_versioned_fields_8029(byte *ptr, const byte *end_ptr,
size_t &n_dropped) {
uint16_t n_inst = 0;
ptr = read_2_bytes(ptr, end_ptr, n_inst);
if (ptr == nullptr) return (nullptr);
ut_ad(n_inst > 0);

for (auto i = n_inst; i > 0; --i) {
Expand Down

0 comments on commit 9729eb3

Please sign in to comment.