From a38b1cbc5e917d945340a6dd9dba4274a2eb8789 Mon Sep 17 00:00:00 2001 From: David Oberhollenzer Date: Fri, 23 Aug 2019 13:23:58 +0200 Subject: Size accounting + alloc() overflow checking, round #2 Signed-off-by: David Oberhollenzer --- lib/sqfs/write_xattr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/sqfs/write_xattr.c') diff --git a/lib/sqfs/write_xattr.c b/lib/sqfs/write_xattr.c index 7214ea7..2263fbe 100644 --- a/lib/sqfs/write_xattr.c +++ b/lib/sqfs/write_xattr.c @@ -215,7 +215,7 @@ int write_xattr(int outfd, fstree_t *fs, sqfs_super_t *super, if ((count * sizeof(id_ent)) % SQFS_META_BLOCK_SIZE) ++blocks; - tbl = calloc(sizeof(uint64_t), blocks); + tbl = alloc_array(sizeof(uint64_t), blocks); if (tbl == NULL) { perror("generating xattr ID table"); -- cgit v1.2.3