-
Notifications
You must be signed in to change notification settings - Fork 802
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bug 799324 - Invalid free in gvalue_from_kvp_value()
As of ddc3f28, gvalue_from_kvp_value() takes a GValue pointer from the caller, which in some cases points to memory on the stack. If that is the case and the code also hits the default case in the switch statement, the unconditional g_slice_free() call will attempt to free stack memory, causing the program to abort. Fix by requiring the caller to always pass in a valid GValue pointer, making the caller responsible for freeing it if necessary. This also means that it is no longer necessary for gvalue_from_kvp_value() to return a value, so make it a void function.
- Loading branch information
Showing
3 changed files
with
7 additions
and
13 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