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

Commit e657bf55 authored by Ting-Yuan Huang's avatar Ting-Yuan Huang Committed by android-build-merger
Browse files

Merge "sdcard: mute false compiler alarm" am: cb4e1645

am: 124294a3

Change-Id: I6e8964c4eb7426b838c5f780a5c87136bfbc24e5
parents 4db97b46 124294a3
Loading
Loading
Loading
Loading
+3 −1
Original line number Original line Diff line number Diff line
@@ -249,7 +249,9 @@ static void run(const char* source_path, const char* label, uid_t uid,
    global.root.uid = AID_ROOT;
    global.root.uid = AID_ROOT;
    global.root.under_android = false;
    global.root.under_android = false;


    strcpy(global.source_path, source_path);
    // Clang static analyzer think strcpy potentially overwrites other fields
    // in global. Use snprintf() to mute the false warning.
    snprintf(global.source_path, sizeof(global.source_path), "%s", source_path);


    if (multi_user) {
    if (multi_user) {
        global.root.perm = PERM_PRE_ROOT;
        global.root.perm = PERM_PRE_ROOT;