-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
config: Replace some problematic uses of asprintf
asprintf will place the generated strings on the heap, but heap memory is not included in core dumps, which renders the generated error messages useless. Instead, error messages should be generated into buffers on the stack because the whole stack will be included in a core dump. Message generation should be moved to its own function that shouldn't be inlined, to avoid bloating the calling function with the otherwise useless buffer and the associated stack smashing protection.
- Loading branch information
Showing
2 changed files
with
58 additions
and
27 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