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

Commit cedcd20b authored by Michael Hoisie's avatar Michael Hoisie Committed by Automerger Merge Worker
Browse files

Merge "Add null check for fgets in BufferQueueCore" into rvc-dev am:...

Merge "Add null check for fgets in BufferQueueCore" into rvc-dev am: 9b5bf0f4 am: 4db659e8 am: 52d68a2b am: 52fb8cb5

Change-Id: I16378dcf956181f754e78978b6271e7ef2feafcf
parents 60486639 52fb8cb5
Loading
Loading
Loading
Loading
+5 −3
Original line number Diff line number Diff line
@@ -75,11 +75,13 @@ static status_t getProcessName(int pid, String8& name) {
    if (NULL != fp) {
        const size_t size = 64;
        char proc_name[size];
        fgets(proc_name, size, fp);
        char* result = fgets(proc_name, size, fp);
        fclose(fp);
        if (result != nullptr) {
            name = proc_name;
            return NO_ERROR;
        }
    }
    return INVALID_OPERATION;
}