Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d67b177f authored by Ramkumar Radhakrishnan's avatar Ramkumar Radhakrishnan Committed by Steve Kondik
Browse files

SF: Fix NULL pointer dereferencing in dumpDrawCycle()

Check for NULL before dereferencing a pointer in dumpDrawCycle()

Change-Id: I1f06214577d0065c988877acb0f1b4378080690f
CRs-Fixed: 1018335
parent a887c199
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -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);