Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Initialise jq.input_cb{,_data} to NULL in jq_init()
To avoid causing segmentation faults when input/1 is called in a jq_state on which jq_set_input_cb() has not been called; e.g. the one used by jq --run-tests. That segfault could also by fixed in run_jq_tests() by calling: jq_set_input_cb(jq, NULL, NULL); But I think it makes sense to just make jq_init() initialise those values to NULL. Ref: jqlang#2717 (comment)
- Loading branch information