Bug 14945 - Crash with non-standard $TZ
Crash with non-standard $TZ
Status: CLOSED NOT REPRODUCIBLE
Product: R
Classification: Unclassified
Component: System-specific
R 2.15.0 patched
x86_64/x64/amd64 (64-bit) Linux
: P5 normal
Assigned To: R-core
https://bugzilla.redhat.com/show_bug....
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-06-13 12:14 UTC by Jan Kratochvil
Modified: 2012-06-25 12:03 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jan Kratochvil 2012-06-13 12:14:35 UTC
My TZ is set to ":/usr/share/zoneinfo/Europe/Prague" which overruns buffer.

src/main/datetime.c
do_asPOSIXlt
    char oldtz[20] = "";

(gdb) bt
#0  __strcpy_sse2_unaligned () at ../sysdeps/x86_64/multiarch/strcpy-sse2-unaligned.S:124
#1  0x00007ffff7abf22b in set_tz (tz=0x1cb9e08 ":/usr/share/zoneinfo/Europe/Prague", oldtz=0x7ffffffe50c0 ":/usr/share/zoneinfo/Europe/Prague\r\001") at /usr/include/bits/string3.h:105
#2  0x00007ffff7ac2f5f in do_asPOSIXlt (call=<optimized out>, op=<optimized out>, args=<optimized out>, env=<optimized out>) at datetime.c:684
#3  0x00007ffff7b0272b in bcEval (body=<optimized out>, rho=<optimized out>, useCache=<optimized out>) at eval.c:4430
Comment 1 Brian Ripley 2012-06-25 12:03:44 UTC
We don't actually have an R code example to reproduce, but the limit is now checked (and raised).