Hello, This is a follow-up to a discussion on the IRC channel regarding musl's tzset() implementation. I did some tests of the tzset() code. The code basically provides parsers for two kinds of input formats: 1. TZ env values (e.g. in the TZ POSIX format [1]) 2. Zoneinfo files as provided by the IANA [2] As part of my performed tests I found various spatial memory safety violations in these two parsers. Both of them parse input through a pointer which is continuously advanced using pointer arithmetic and then dereferenced to access individual fields of the input formats. Unfortunately, the parsing code is largely lacking boundary checks to ensure that the pointer is still in bounds when dereferenced. As an example, consider the attached zoneinfo file. This file will cause musl to perform an out-of-bounds memory read which likely results in a segmentation fault on most systems: $ TZ=./zonefile-musl-crash.bin busybox date Segmentation fault (core dumped) This particular zoneinfo file causes a segmentation fault due to the calculation of the types pointer: types = index + zi_read32(trans-12); (gdb) p zi_read32(trans-12) $1 = 4286962800 The resulting types pointer value is outside the bounds of the mapped zoneinfo file (which is only 2048 bytes large). The value is also dereferenced later as part of the following code: for (p=types; p