Initialise jq_state->debug_cb{,_data} to NULL
To make debug/0 not call an uninitialised function pointer when using --run-tests or when using a jq_state on which jq_set_debug_cb() has not been called.
This commit is contained in:
1 parent
9e4c71558a
commit
bb0f898c01
2 files changed
+8
-1
No files matched your search
+5
-1
@@ -1820,8 +1820,12 @@ tojson | fromjson
|
||||
{"a":null}
|
||||
|
||||
|
||||
# calling input/1 in a test doesn't crash jq
|
||||
# calling input/0, or debug/0 in a test doesn't crash jq
|
||||
|
||||
try input catch .
|
||||
null
|
||||
"break"
|
||||
|
||||
debug
|
||||
1
|
||||
1
|
||||
Reference in new issue
Block a user