Closed TobleMiner closed 4 years ago
PR #102 causes a regression in image-flash.c
image-flash.c
Problem is that pad_file behaves differently depending on whether it is called with infile == NULL or infile != NULL.
pad_file
infile == NULL
infile != NULL
If called with infile == NULL size is assumed to be an absolute offset in the output file. Else size is assumed to be the size of infile + padding.
size
infile
Since https://github.com/pengutronix/genimage/pull/102/files#diff-088cb03e9ae7e9e2f4755d4ccf535699L63 handles those cases the same, output images are no longer created correctly.
Unfortunately I did not discover this during testing because none of my testcases had an empty partition that was preceded by another partition.
PR #102 causes a regression in
image-flash.c
Problem is that
pad_file
behaves differently depending on whether it is called withinfile == NULL
orinfile != NULL
.If called with
infile == NULL
size
is assumed to be an absolute offset in the output file. Elsesize
is assumed to be the size ofinfile
+ padding.Since https://github.com/pengutronix/genimage/pull/102/files#diff-088cb03e9ae7e9e2f4755d4ccf535699L63 handles those cases the same, output images are no longer created correctly.
Unfortunately I did not discover this during testing because none of my testcases had an empty partition that was preceded by another partition.
103 contains a suggestion on how to fix the regression