Fixed out of bound read in GB_load_state_from_buffer. Closes #104
This commit is contained in:
parent
72b1fe0500
commit
7c61445fe3
@ -294,6 +294,8 @@ static bool buffer_read_section(const uint8_t **buffer, size_t *buffer_length, v
|
||||
return false;
|
||||
}
|
||||
|
||||
if (saved_size > *buffer_length) return false;
|
||||
|
||||
if (saved_size <= size) {
|
||||
if (buffer_read(dest, saved_size, buffer, buffer_length) != saved_size) {
|
||||
return false;
|
||||
|
Loading…
Reference in New Issue
Block a user