Skip to content
Snippets Groups Projects
Commit 9d6984a5 authored by Serge Lamikhov-Center's avatar Serge Lamikhov-Center
Browse files

An attempt to address unusual case where 'note' size is larger than Elf_Word

parent ee891ca7
No related branches found
No related tags found
No related merge requests found
......@@ -102,7 +102,7 @@
"request": "launch",
"program": "${workspaceFolder}/tests/elfio_fuzzer",
"args": [
"oom-9025696a52c7f5cb94d482225a6b3727e9691f5b"
"oom-7ff496ad1166860893dba1121d088da4ce9fef65"
],
"cwd": "${workspaceFolder}/tests",
}
......
......@@ -152,9 +152,12 @@ class note_section_accessor_template
(Elf_Xword)3 * sizeof( Elf_Word ) +
( ( namesz + 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 );
}
else {
break;
}
current += advance;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment