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

Commit 4854e292 authored by Tao Bao's avatar Tao Bao Committed by Android Git Automerger
Browse files

am ad509fd4: Merge "Fix potential crash"

* commit 'ad509fd4':
  Fix potential crash
parents 434a1761 ad509fd4
Loading
Loading
Loading
Loading
+9 −5
Original line number Diff line number Diff line
@@ -1036,12 +1036,16 @@ main(int argc, char **argv) {
        if (strncmp(update_package, "CACHE:", 6) == 0) {
            int len = strlen(update_package) + 10;
            char* modified_path = (char*)malloc(len);
            if (modified_path) {
                strlcpy(modified_path, "/cache/", len);
                strlcat(modified_path, update_package+6, len);
                printf("(replacing path \"%s\" with \"%s\")\n",
                       update_package, modified_path);
                update_package = modified_path;
            }
            else
                printf("modified_path allocation failed\n");
        }
    }
    printf("\n");