Fix NUL truncation in the JSON parser
This fixes CVE-2026-33948.
This commit is contained in:
1 parent
fdf8ef0f08
commit
6374ae0bcd
2 files changed
+7
-7
No files matched your search
+1
-7
@@ -312,13 +312,7 @@ static int jq_util_input_read_more(jq_util_input_state *state) {
|
||||
if (p != NULL)
|
||||
state->current_line++;
|
||||
|
||||
if (p == NULL && state->parser != NULL) {
|
||||
/*
|
||||
* There should be no NULs in JSON texts (but JSON text
|
||||
* sequences are another story).
|
||||
*/
|
||||
state->buf_valid_len = strlen(state->buf);
|
||||
} else if (p == NULL && feof(state->current_input)) {
|
||||
if (p == NULL && feof(state->current_input)) {
|
||||
size_t i;
|
||||
|
||||
/*
|
||||
|
||||
Reference in new issue
Block a user