diff options
author | Patrick McDermott <patrick.mcdermott@libiquity.com> | 2023-06-17 16:07:28 (EDT) |
---|---|---|
committer | Patrick McDermott <patrick.mcdermott@libiquity.com> | 2023-06-17 17:49:45 (EDT) |
commit | 72cbc7b243326be13f986dd160e7e69a38d5b869 (patch) | |
tree | 60e2de50ea4c00cd7846cd58418410863918e331 /src | |
parent | 20e7387e0bbdee2ebf102df20268a7916fbabff3 (diff) |
opk/write: Fix temporary archive file name buffer
Diffstat (limited to 'src')
-rw-r--r-- | src/opk/write.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/opk/write.c b/src/opk/write.c index 2986ae0..3880552 100644 --- a/src/opk/write.c +++ b/src/opk/write.c @@ -509,7 +509,7 @@ opkg_opk_opk_write(struct opkg_opk_opk *opk, const char *file_name) /* Allocate temporary archive file name buffer. */ opk->temp_file_name = - malloc(sizeof(file_name) + sizeof("~control.tar.gz")); + malloc(strlen(file_name) + strlen("~control.tar.gz") + 1); if (opk->temp_file_name == NULL) { ret = OPKG_OPK_ERROR; goto out4; |