-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix possible uninitialised value dereference if jq_init() fails
If jq_init() fails, goto out would try to free input_state which is uninitialised. I initialised input_state to NULL to fix the problem. I also fixed jq_util_input_init() not handling OOM errors by returning NULL, and added code to make jq exit cleanly if it returns NULL. The code base is filled with these kinds of problems, but this one was easy to fix, so might as well fix it now... Ref: #2934 (comment) Reported-By: Klemens Nanni <kn@openbsd.org>
- Loading branch information
Showing
2 changed files
with
14 additions
and
6 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