Skip to content

Commit 638c984

Browse files
PrivacyIsARightDuncaen
authored andcommitted
bin/xbps-create: use the right argument for the size of xbps_file_sha256
1 parent 96eed20 commit 638c984

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

bin/xbps-create/main.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -380,7 +380,6 @@ ftw_cb(const char *fpath, const struct stat *sb, const struct dirent *dir UNUSED
380380
xbps_dictionary_t fileinfo = NULL;
381381
const char *filep = NULL;
382382
char *p, *p2, *dname;
383-
char sha256[XBPS_SHA256_SIZE];
384383

385384
/* Ignore metadata files generated by xbps-src and destdir */
386385
if ((strcmp(fpath, ".") == 0) ||
@@ -549,7 +548,7 @@ ftw_cb(const char *fpath, const struct stat *sb, const struct dirent *dir UNUSED
549548
xe->type = ENTRY_TYPE_FILES;
550549
}
551550

552-
if (!xbps_file_sha256(xe->sha256, sizeof sha256, fpath))
551+
if (!xbps_file_sha256(xe->sha256, sizeof xe->sha256, fpath))
553552
die("failed to process hash for: %s", fpath);
554553
xbps_dictionary_set_cstring(fileinfo, "sha256", xe->sha256);
555554

0 commit comments

Comments
 (0)