summaryrefslogtreecommitdiff
path: root/libc/malloc_hooks/malloc_hooks.cpp
diff options
context:
space:
mode:
authorElliott Hughes <enh@google.com>2016-10-03 12:29:30 -0700
committerElliott Hughes <enh@google.com>2016-10-03 16:37:26 -0700
commitfa8f1d0ab21ae18e34c4d2274872f0f2e19cb479 (patch)
treeff07a3398d2c6e6273ee05064ce36d856eeb4e32 /libc/malloc_hooks/malloc_hooks.cpp
parentabe80314ebc39dec4c2d6e65fb11c1e16e3cfe09 (diff)
Fix tzdata loading.
Android uses one large file of tzdata, so the "read up to the maximum possible length of a valid tzfile" code in upstream localtime.c is broken: there is always data after the current tzfile (even the last tzfile is followed by the zone.tab data). This patch passes the exact length through to the read(2) call so we don't over-read, rather than have to rewrite upstream code that measures back from the "end" of the tzfile. The old code failed the existing time.strftime_null_tm_zone test after updating to tzdata2016g. (cherry picked from commit 81c46fc10fa60fd341f11024d8d3f26ff2c69082) Bug: http://b/31848040 Test: time.strftime_null_tm_zone Change-Id: Iee059b5a8c051bd4952cfd80f02b00d83e489d5e
Diffstat (limited to 'libc/malloc_hooks/malloc_hooks.cpp')
0 files changed, 0 insertions, 0 deletions