about summary refs log tree commit diff
path: root/src/stdio/swscanf.c
diff options
context:
space:
mode:
authorRich Felker <dalias@aerifal.cx>2014-04-22 20:09:56 -0400
committerRich Felker <dalias@aerifal.cx>2014-04-22 20:09:56 -0400
commitc3d9d172b1fcd56c4d356798f4e3b4653076bcc3 (patch)
treefb8439c21f7274af462e81abe799d46736525222 /src/stdio/swscanf.c
parent0f2315b4af1c58cbfb7c7f9da69b495cd146cc18 (diff)
downloadmusl-c3d9d172b1fcd56c4d356798f4e3b4653076bcc3.tar.gz
musl-c3d9d172b1fcd56c4d356798f4e3b4653076bcc3.tar.xz
musl-c3d9d172b1fcd56c4d356798f4e3b4653076bcc3.zip
perform minimal sanity checks on zoneinfo files loaded via TZ variable
previously, setting TZ to the pathname of a file which was not a valid
zoneinfo file would usually cause programs using local time zone based
operations to crash. the new code checks the file size and magic at
the beginning of the file, which seems sufficient to prevent
accidental misconfiguration from causing crashes. attempting to make
fully-robust validation would be futile unless we wanted to drop use
of mmap (shared zoneinfo) and instead read it into a local buffer,
since such validation would be subject to race conditions with
modification of the file.
Diffstat (limited to 'src/stdio/swscanf.c')
0 files changed, 0 insertions, 0 deletions