mirror of
https://github.com/Proxmark/proxmark3.git
synced 2024-09-21 15:26:35 +08:00
Fix comparison error in fpga_compress
The comparison would check for greater-than-or-equal the maximum amount of bytes to read/write when it should check for greater-than only.
This commit is contained in:
parent
2da2e92837
commit
61611f5b85
|
@ -96,7 +96,7 @@ int zlib_compress(FILE *infile[], uint8_t num_infiles, FILE *outfile)
|
|||
}
|
||||
}
|
||||
|
||||
if (i >= num_infiles * FPGA_CONFIG_SIZE) {
|
||||
if (i > num_infiles * FPGA_CONFIG_SIZE) {
|
||||
fprintf(stderr, "Input files too big (total > %lu bytes). These are probably not PM3 FPGA config files.", num_infiles*FPGA_CONFIG_SIZE);
|
||||
for(uint16_t j = 0; j < num_infiles; j++) {
|
||||
fclose(infile[j]);
|
||||
|
|
Loading…
Reference in a new issue