Loading cmds/installd/commands.c +5 −3 Original line number Original line Diff line number Diff line Loading @@ -417,7 +417,9 @@ int create_cache_path(char path[PKG_PATH_MAX], const char *src) return -1; return -1; } } dstlen = srclen + strlen(DALVIK_CACHE_PREFIX) + const char *cache_path = strncmp(src, "/system", 7) ? DALVIK_CACHE_PREFIX : DALVIK_SYSTEM_CACHE_PREFIX; dstlen = srclen + strlen(cache_path) + strlen(DALVIK_CACHE_POSTFIX) + 1; strlen(DALVIK_CACHE_POSTFIX) + 1; if (dstlen > PKG_PATH_MAX) { if (dstlen > PKG_PATH_MAX) { Loading @@ -425,11 +427,11 @@ int create_cache_path(char path[PKG_PATH_MAX], const char *src) } } sprintf(path,"%s%s%s", sprintf(path,"%s%s%s", DALVIK_CACHE_PREFIX, cache_path, src + 1, /* skip the leading / */ src + 1, /* skip the leading / */ DALVIK_CACHE_POSTFIX); DALVIK_CACHE_POSTFIX); for(tmp = path + strlen(DALVIK_CACHE_PREFIX); *tmp; tmp++) { for(tmp = path + strlen(cache_path); *tmp; tmp++) { if (*tmp == '/') { if (*tmp == '/') { *tmp = '@'; *tmp = '@'; } } Loading cmds/installd/installd.h +1 −0 Original line number Original line Diff line number Diff line Loading @@ -67,6 +67,7 @@ #define DALVIK_CACHE_POSTFIX "/classes.dex" #define DALVIK_CACHE_POSTFIX "/classes.dex" #define UPDATE_COMMANDS_DIR_PREFIX "/system/etc/updatecmds/" #define UPDATE_COMMANDS_DIR_PREFIX "/system/etc/updatecmds/" #define DALVIK_SYSTEM_CACHE_PREFIX "/cache/dalvik-cache/" #define PKG_NAME_MAX 128 /* largest allowed package name */ #define PKG_NAME_MAX 128 /* largest allowed package name */ #define PKG_PATH_MAX 256 /* max size of any path we use */ #define PKG_PATH_MAX 256 /* max size of any path we use */ Loading Loading
cmds/installd/commands.c +5 −3 Original line number Original line Diff line number Diff line Loading @@ -417,7 +417,9 @@ int create_cache_path(char path[PKG_PATH_MAX], const char *src) return -1; return -1; } } dstlen = srclen + strlen(DALVIK_CACHE_PREFIX) + const char *cache_path = strncmp(src, "/system", 7) ? DALVIK_CACHE_PREFIX : DALVIK_SYSTEM_CACHE_PREFIX; dstlen = srclen + strlen(cache_path) + strlen(DALVIK_CACHE_POSTFIX) + 1; strlen(DALVIK_CACHE_POSTFIX) + 1; if (dstlen > PKG_PATH_MAX) { if (dstlen > PKG_PATH_MAX) { Loading @@ -425,11 +427,11 @@ int create_cache_path(char path[PKG_PATH_MAX], const char *src) } } sprintf(path,"%s%s%s", sprintf(path,"%s%s%s", DALVIK_CACHE_PREFIX, cache_path, src + 1, /* skip the leading / */ src + 1, /* skip the leading / */ DALVIK_CACHE_POSTFIX); DALVIK_CACHE_POSTFIX); for(tmp = path + strlen(DALVIK_CACHE_PREFIX); *tmp; tmp++) { for(tmp = path + strlen(cache_path); *tmp; tmp++) { if (*tmp == '/') { if (*tmp == '/') { *tmp = '@'; *tmp = '@'; } } Loading
cmds/installd/installd.h +1 −0 Original line number Original line Diff line number Diff line Loading @@ -67,6 +67,7 @@ #define DALVIK_CACHE_POSTFIX "/classes.dex" #define DALVIK_CACHE_POSTFIX "/classes.dex" #define UPDATE_COMMANDS_DIR_PREFIX "/system/etc/updatecmds/" #define UPDATE_COMMANDS_DIR_PREFIX "/system/etc/updatecmds/" #define DALVIK_SYSTEM_CACHE_PREFIX "/cache/dalvik-cache/" #define PKG_NAME_MAX 128 /* largest allowed package name */ #define PKG_NAME_MAX 128 /* largest allowed package name */ #define PKG_PATH_MAX 256 /* max size of any path we use */ #define PKG_PATH_MAX 256 /* max size of any path we use */ Loading