Fix NUL truncation in the JSON parser

This fixes CVE-2026-33948.
This commit is contained in:
itchyny committed 2026-04-13 08:46:11 +09:00
1 parent fdf8ef0f08
commit 6374ae0bcd
2 files changed
+7 -7

No files matched your search

+6
View File
@@ -880,4 +880,10 @@ $JQ -nf $d/prog.jq 2> $d/out && {
}
diff $d/out $d/expected
# CVE-2026-33948: No NUL truncation in the JSON parser
if printf '{}\x00{}' | $JQ >/dev/null 2> /dev/null; then
printf 'Error expected but jq exited successfully\n' 1>&2
exit 1
fi
exit 0