-
Notifications
You must be signed in to change notification settings - Fork 147
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix uninitialized data in rewriter elf_update (#54)
Valgrind complained of uninitialized data in pwrite during elf_update. Using --track-origins=yes found three origins to fix: - trap_mapping_header has a padding field that was unset. Use memset on the whole thing to be sure it's fully initialized. - Parts of .dyninstInst may not be written due to gaps from inferior realloc or free. Use calloc to initially zero this buffer. - The new dynstr section leaves a byte of padding between the old and new data, but did not set it. Make that NUL.
- Loading branch information
1 parent
e1afc69
commit 69e1b1d
Showing
3 changed files
with
4 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters