Merge pull request #28 from marc-hb/copy-sram-overflow

manifest.c: assert buffer overflow in man_copy_sram()
This commit is contained in:
Marc 2020-10-15 10:18:04 -07:00 committed by GitHub
commit 37323face2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 0 deletions

View File

@ -167,6 +167,8 @@ static int man_copy_sram(struct image *image, Elf32_Shdr *section,
void *buffer = image->fw_image + offset;
size_t count;
assert((uint64_t)offset + section->size <= image->adsp->image_size);
switch (section->type) {
case SHT_INIT_ARRAY:
/* fall through */