image: fix binary detection for small files
commitd41a204d8224dad66265e694e5ccf3379de0d494
authorMarek Vrbka <marek.vrbka@codasip.com>
Thu, 31 Aug 2023 06:30:37 +0000 (31 08:30 +0200)
committerAntonio Borneo <borneo.antonio@gmail.com>
Fri, 8 Sep 2023 22:01:59 +0000 (8 22:01 +0000)
treed7370f230ee82fb224259b7b2ea4a48f395c8a11
parent62f76b2169302b9500deea737a017168271824ac
image: fix binary detection for small files

Previously, if the image file was less than 9 bytes long,
it was assumed to be an error when it could be a binary
image file. This patch makes OpenOCD detect these cases
as binary files.

Change-Id: I5b4dad2b547786246887812ac75907378fe58671
Signed-off-by: Marek Vrbka <marek.vrbka@codasip.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/7880
Tested-by: jenkins
Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
src/target/image.c