mirror of
https://github.com/varun-r-mallya/sysprof.git
synced 2025-12-31 20:36:25 +00:00
Fix debug link crc reading
Debug link crc values is strored after null terminated string in 4 aligned offset. But sysprof was only taking into accoutn alignment that made elf parser read wrong crc from the debug link string. Fix is simple check for string length and adding the length to offset before alignment. Signed-off-by: Pauli Nieminen <suokkos@gmail.com>
This commit is contained in:
committed by
Søren Sandmann Pedersen
parent
3c11010659
commit
e9eb5ae3ae
@ -744,7 +744,8 @@ elf_parser_get_debug_link (ElfParser *parser, guint32 *crc32)
|
||||
|
||||
if (crc32)
|
||||
{
|
||||
offset = (offset + 3) & ~0x3;
|
||||
int len = strlen (result) + 1;
|
||||
offset = (offset + len + 3) & ~0x3;
|
||||
|
||||
*crc32 = GET_UINT32 (parser, offset);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user