mirror of
https://github.com/bluekitchen/btstack.git
synced 2025-03-29 13:20:39 +00:00
btstack_resample: prevent out of bound read
This commit is contained in:
parent
e9d8dc8bd8
commit
0532fef7b5
@ -79,6 +79,7 @@ uint16_t btstack_resample_block(btstack_resample_t * context, const int16_t * in
|
||||
int i;
|
||||
if (src_pos >= (num_frames - 1u)){
|
||||
// store last sample
|
||||
index = (num_frames-1u) * context->num_channels;
|
||||
for (i=0;i<context->num_channels;i++){
|
||||
context->last_sample[i] = input_buffer[index++];
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user