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

Commit 4f215551 authored by Elliott Hughes's avatar Elliott Hughes Committed by Gerrit Code Review
Browse files

Merge "More secure and compiler warning fix for sprintf into snprintf"

parents 09c5fcf7 a2f37e4f
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -306,7 +306,7 @@ int set_sched_policy(int tid, SchedPolicy policy)
    char thread_name[255];
    int fd;

    sprintf(statfile, "/proc/%d/stat", tid);
    snprintf(statfile, sizeof(statfile), "/proc/%d/stat", tid);
    memset(thread_name, 0, sizeof(thread_name));

    fd = open(statfile, O_RDONLY);