summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorEmanuele Torre <torreemanuele6@gmail.com>2024-03-19 02:01:53 +0100
committerGitHub <noreply@github.com>2024-03-19 02:01:53 +0100
commitbc9614682571fa2e8185398c89322c0300f92f76 (patch)
treed0cd4425341e1597e906824ad9847ca18ca25fcd /tests
parentd69733154a2b411c4248a3f90e582115a8512276 (diff)
builtin.c: jv2tm: fix UB and accept array inputs with not all the values
Now, time functions accept array inputs even if they don't have all the elements, 0 will be assumed if a value is not present. Also, jv2tm now properly clamps large number values to a signed 32-bit integer and rejects nan. Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=65885
Diffstat (limited to 'tests')
-rw-r--r--tests/jq.test4
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/jq.test b/tests/jq.test
index 463161c7..584ab2b6 100644
--- a/tests/jq.test
+++ b/tests/jq.test
@@ -1568,6 +1568,10 @@ strftime("%A, %B %d, %Y")
1435677542.822351
"Tuesday, June 30, 2015"
+strftime("%Y-%m-%dT%H:%M:%SZ")
+[2024,2,15]
+"2024-03-15T00:00:00Z"
+
gmtime
1425599507
[2015,2,5,23,51,47,4,63]