diff options
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; |