SF: Fix NULL pointer dereferencing in dumpDrawCycle()
Check for NULL before dereferencing a pointer in dumpDrawCycle() Change-Id: I1f06214577d0065c988877acb0f1b4378080690f CRs-Fixed: 1018335
This commit is contained in:
parent
a887c19994
commit
d67b177ff6
@ -335,6 +335,10 @@ void ExSurfaceFlinger::dumpDrawCycle(bool prePrepare) {
|
||||
|
||||
gettimeofday(&tv, NULL);
|
||||
ptm = localtime(&tv.tv_sec);
|
||||
if (ptm == NULL) {
|
||||
return;
|
||||
}
|
||||
|
||||
strftime (hms, sizeof (hms), "%H:%M:%S", ptm);
|
||||
millis = tv.tv_usec / 1000;
|
||||
snprintf(timeStamp, sizeof(timeStamp), "Timestamp: %s.%03ld", hms, millis);
|
||||
|
Loading…
Reference in New Issue
Block a user