fpga_compress: fix heap corruption

This commit is contained in:
Philippe Teuwen
2026-04-14 10:14:38 +02:00
parent d6c823bea3
commit c0ecb1c626
+2 -2
View File
@@ -59,9 +59,9 @@ static int zlib_compress(FILE *infile[], uint8_t num_infiles, FILE *outfile) {
uint32_t total_size = 0;
do {
if (total_size > num_infiles * FPGA_CONFIG_SIZE) {
if (total_size >= num_infiles * FPGA_CONFIG_SIZE) {
fprintf(stderr,
"Input files too big (total > %li bytes). These are probably not PM3 FPGA config files.\n"
"Input files too big (total >= %li bytes). These are probably not PM3 FPGA config files.\n"
, num_infiles * FPGA_CONFIG_SIZE
);