mirror of
https://github.com/serge1/ELFIO.git
synced 2024-12-27 12:17:28 +00:00
An attempt to address unusual case where 'note' size is larger than Elf_Word
This commit is contained in:
parent
ee891ca7c9
commit
9d6984a59b
2
.vscode/launch.json
vendored
2
.vscode/launch.json
vendored
@ -102,7 +102,7 @@
|
|||||||
"request": "launch",
|
"request": "launch",
|
||||||
"program": "${workspaceFolder}/tests/elfio_fuzzer",
|
"program": "${workspaceFolder}/tests/elfio_fuzzer",
|
||||||
"args": [
|
"args": [
|
||||||
"oom-9025696a52c7f5cb94d482225a6b3727e9691f5b"
|
"oom-7ff496ad1166860893dba1121d088da4ce9fef65"
|
||||||
],
|
],
|
||||||
"cwd": "${workspaceFolder}/tests",
|
"cwd": "${workspaceFolder}/tests",
|
||||||
}
|
}
|
||||||
|
@ -152,9 +152,12 @@ class note_section_accessor_template
|
|||||||
(Elf_Xword)3 * sizeof( Elf_Word ) +
|
(Elf_Xword)3 * sizeof( Elf_Word ) +
|
||||||
( ( namesz + align - 1 ) / align ) * (Elf_Xword)align +
|
( ( namesz + align - 1 ) / align ) * (Elf_Xword)align +
|
||||||
( ( descsz + align - 1 ) / align ) * (Elf_Xword)align;
|
( ( descsz + align - 1 ) / align ) * (Elf_Xword)align;
|
||||||
if ( current + advance <= size ) {
|
if ( namesz < size && descsz < size && current + advance <= size ) {
|
||||||
note_start_positions.emplace_back( current );
|
note_start_positions.emplace_back( current );
|
||||||
}
|
}
|
||||||
|
else {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
current += advance;
|
current += advance;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user