diff options
author | Timo Teras <timo.teras@iki.fi> | 2009-07-15 15:59:06 +0300 |
---|---|---|
committer | Timo Teras <timo.teras@iki.fi> | 2009-07-15 15:59:06 +0300 |
commit | ba76c5f48ae584c4085ef97fb16e5a6f72adfe25 (patch) | |
tree | 591de04ad42b0bdcdf51e1926f368e68a1a55172 /src/package.c | |
parent | a7c5fda40ac76c4a43af7a4ee5241514f890a2ee (diff) | |
download | apk-tools-ba76c5f48ae584c4085ef97fb16e5a6f72adfe25.tar.gz apk-tools-ba76c5f48ae584c4085ef97fb16e5a6f72adfe25.tar.bz2 apk-tools-ba76c5f48ae584c4085ef97fb16e5a6f72adfe25.tar.xz apk-tools-ba76c5f48ae584c4085ef97fb16e5a6f72adfe25.zip |
cache: make cache cleaning work again properly
Diffstat (limited to 'src/package.c')
-rw-r--r-- | src/package.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/package.c b/src/package.c index 6c050cf..d408f73 100644 --- a/src/package.c +++ b/src/package.c @@ -43,6 +43,9 @@ int apk_pkg_parse_name(apk_blob_t apkname, { int i, dash = 0; + if (APK_BLOB_IS_NULL(apkname)) + return -1; + for (i = apkname.len - 2; i >= 0; i--) { if (apkname.ptr[i] != '-') continue; |