Skip to content

Commit a573997

Browse files
qkaiservlaci
authored andcommitted
chore(deps): fix calloc-transposed-args issues in simg2img
1 parent 4da5db4 commit a573997

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

overlay.nix

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,18 @@ final: prev:
1717
--replace-fail \
1818
'aligned_offset = offset & ~(4096 - 1);' \
1919
'aligned_offset = offset & ~(sysconf(_SC_PAGESIZE) - 1);'
20+
substituteInPlace backed_block.cpp \
21+
--replace-fail \
22+
'reinterpret_cast<backed_block_list*>(calloc(sizeof(struct backed_block_list), 1));' \
23+
'reinterpret_cast<backed_block_list*>(calloc(1, sizeof(struct backed_block_list)));'
24+
substituteInPlace sparse.cpp \
25+
--replace-fail \
26+
'struct sparse_file* s = reinterpret_cast<sparse_file*>(calloc(sizeof(struct sparse_file), 1));' \
27+
'struct sparse_file* s = reinterpret_cast<sparse_file*>(calloc(1, sizeof(struct sparse_file)));'
28+
substituteInPlace simg2simg.cpp \
29+
--replace-fail \
30+
'out_s = (struct sparse_file**)calloc(sizeof(struct sparse_file*), files);' \
31+
'out_s = (struct sparse_file**)calloc(files, sizeof(struct sparse_file*));'
2032
'';
2133
});
2234

0 commit comments

Comments
 (0)