summaryrefslogtreecommitdiffstats
path: root/drm
diff options
context:
space:
mode:
authorElliott Hughes <enh@google.com>2016-01-05 17:05:47 -0800
committerSteve Kondik <steve@cyngn.com>2016-01-08 21:00:48 -0800
commit698154336144bf4e76dda488a0b9ef7258775ea9 (patch)
tree00d4d9ec53d103ec9ea2bc30ad1417cef2fbb510 /drm
parent8c4d014e2919992584625cc15c0e0b10e30388fe (diff)
downloadframeworks_av-698154336144bf4e76dda488a0b9ef7258775ea9.zip
frameworks_av-698154336144bf4e76dda488a0b9ef7258775ea9.tar.gz
frameworks_av-698154336144bf4e76dda488a0b9ef7258775ea9.tar.bz2
Clean up time zone handling in MtpUtils::parseDateTime.
The intent here is supposed to be to use local time (which mktime(3) does) unless the string ends 'Z' in which case we're supposed to use UTC. The UTC equivalent of mktime(3) is timegm(3). This code has come to my attention in two ways. Externally it was pointed out that the localtime_r(3) was accessing uninitialized memory leading to unpredicatable results. Internally, this is the only caller of the non-standard mktime_tz --- ironically using it in a way that -- apart from the flakiness caused by the uninitialized variable -- would make it behave like the standard mktime(3). Bug: https://code.google.com/p/android/issues/detail?id=185159 Bug: http://b/15765976 Change-Id: I5f015727c4c08a139ef478fafba5811a9758d5df
Diffstat (limited to 'drm')
0 files changed, 0 insertions, 0 deletions