summaryrefslogtreecommitdiff
path: root/src/manifest.c
diff options
context:
space:
mode:
authorReid Rankin <reidrankin@gmail.com>2020-01-24 15:13:43 +0000
committerTimo Teräs <timo.teras@iki.fi>2020-01-25 16:35:31 +0200
commitc7c8ab7c574d9c4360daf41bc0a7e6ac78da0f32 (patch)
treebb94450c834758b00517248cdf7d7ca798ab3194 /src/manifest.c
parentaa882df5116df56d95b3750c28fab5013b680c7a (diff)
downloadapk-tools-c7c8ab7c574d9c4360daf41bc0a7e6ac78da0f32.tar.gz
apk-tools-c7c8ab7c574d9c4360daf41bc0a7e6ac78da0f32.tar.bz2
apk-tools-c7c8ab7c574d9c4360daf41bc0a7e6ac78da0f32.tar.xz
apk-tools-c7c8ab7c574d9c4360daf41bc0a7e6ac78da0f32.zip
don't use hardcoded checksum buffer sizes
Diffstat (limited to 'src/manifest.c')
-rw-r--r--src/manifest.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/manifest.c b/src/manifest.c
index 145714c..8a6d9e8 100644
--- a/src/manifest.c
+++ b/src/manifest.c
@@ -36,7 +36,7 @@ static void process_package(struct apk_database *db, struct apk_package *pkg)
struct apk_db_dir_instance *diri;
struct apk_db_file *file;
struct hlist_node *dc, *dn, *fc, *fn;
- char csum_buf[(APK_CHECKSUM_SHA1 * 2) + 1];
+ char csum_buf[APK_BLOB_CHECKSUM_BUF];
if (ipkg == NULL)
return;
@@ -62,7 +62,7 @@ static int read_file_entry(void *ctx, const struct apk_file_info *ae,
struct apk_istream *is)
{
struct manifest_file_ctx *mctx = ctx;
- char csum_buf[(APK_CHECKSUM_SHA1 * 2) + 1];
+ char csum_buf[APK_BLOB_CHECKSUM_BUF];
apk_blob_t csum_blob = APK_BLOB_BUF(csum_buf);
int r;