summaryrefslogtreecommitdiff
path: root/src/apk.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/apk.c')
-rw-r--r--src/apk.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/apk.c b/src/apk.c
index 103425a..e11f9d9 100644
--- a/src/apk.c
+++ b/src/apk.c
@@ -272,9 +272,10 @@ int main(int argc, char **argv)
struct apk_database db;
struct apk_db_options dbopts;
- apk_argv = malloc(sizeof(char*[argc+1]));
+ apk_argv = malloc(sizeof(char*[argc+2]));
memcpy(apk_argv, argv, sizeof(char*[argc]));
apk_argv[argc] = NULL;
+ apk_argv[argc+1] = NULL;
memset(&dbopts, 0, sizeof(dbopts));
list_init(&dbopts.repository_list);