mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-14 18:48:13 -07:00
a few calloc checks, still many to go
This commit is contained in:
parent
74c60301d1
commit
c37ca881e6
12 changed files with 84 additions and 1 deletions
|
@ -203,6 +203,10 @@ static void write_bitflips_file(odd_even_t odd_even, uint16_t bitflip, int sum_a
|
|||
char filename[80];
|
||||
snprintf(filename, sizeof(filename), "bitflip_%d_%03" PRIx16 "_sum%d_states.bin", odd_even, bitflip, sum_a0);
|
||||
FILE *outfile = fopen(filename, "wb");
|
||||
if (outfile == NULL) {
|
||||
perror("Error opening file");
|
||||
exit(4);
|
||||
}
|
||||
fwrite(&count, 1, sizeof(count), outfile);
|
||||
fwrite(bitset, 1, sizeof(uint32_t) * (1 << 19), outfile);
|
||||
fclose(outfile);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue