summaryrefslogtreecommitdiffstats
path: root/fuzz/bplist-leaks/leak-acb3c00a83d7635638a476a4e70fc1f1caa1a5b1
diff options
context:
space:
mode:
authorGravatar Nikias Bassen2026-11-05 10:00:32 +0100
committerGravatar Nikias Bassen2026-11-05 10:00:32 +0100
commit51f471432715f7a1880d38c135ce41182b4dc78e (patch)
tree131610d91ca3672b7eb6499d6ab778c4bba51636 /fuzz/bplist-leaks/leak-acb3c00a83d7635638a476a4e70fc1f1caa1a5b1
parent5f22030bf57d2f0c78eb26b9778fd3180cfb70f5 (diff)
downloadlibplist-51f471432715f7a1880d38c135ce41182b4dc78e.tar.gz
libplist-51f471432715f7a1880d38c135ce41182b4dc78e.tar.bz2
time64: fix signed overflow for extreme years in gmtime64_r()
IS_LEAP() computed `tm_year + 1900` in int arithmetic, which overflows for dates around year 2^31 (hit via check_tm() when writing dates). Cast to Year (64-bit) in IS_LEAP(). Also make gmtime64_r() return NULL with EOVERFLOW when the calendar year (tm_year + 1900) does not fit in an int; the previous check compared tm_year with itself and could never fail. This avoids strftime() wrapping the year in the output, and callers fall back to their existing default date string. Credit to OSSFuzz
Diffstat (limited to 'fuzz/bplist-leaks/leak-acb3c00a83d7635638a476a4e70fc1f1caa1a5b1')
0 files changed, 0 insertions, 0 deletions