summaryrefslogtreecommitdiff
path: root/rbutil/mkimxboot/mkimxboot.c
diff options
context:
space:
mode:
authorDominik Riebeling <Dominik.Riebeling@gmail.com>2012-06-09 22:03:43 +0200
committerDominik Riebeling <Dominik.Riebeling@gmail.com>2012-06-09 22:08:54 +0200
commit1e2c6506fbf503bace8356f90cd54a5b01a32f88 (patch)
treed25d1a543bff1be353cf9f204b3c5edc1f393fbd /rbutil/mkimxboot/mkimxboot.c
parentc4183e1d67f88da4d934c9e02ca5beb2fc0a8ec0 (diff)
downloadrockbox-1e2c6506fbf503bace8356f90cd54a5b01a32f88.tar.gz
rockbox-1e2c6506fbf503bace8356f90cd54a5b01a32f88.zip
Fix crash in mkimxboot bootloader installation.
mkimxboot requires passing a structure which got extended with another field. This wasn't adjusted in Rockbox Utility, causing an out of bound access to an array, which results in a segfault. Change-Id: I0252849ed0b41f1d8804537c053debc9b0ecd08d
Diffstat (limited to 'rbutil/mkimxboot/mkimxboot.c')
-rw-r--r--rbutil/mkimxboot/mkimxboot.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/rbutil/mkimxboot/mkimxboot.c b/rbutil/mkimxboot/mkimxboot.c
index 8806167078..c33c0404c0 100644
--- a/rbutil/mkimxboot/mkimxboot.c
+++ b/rbutil/mkimxboot/mkimxboot.c
@@ -331,6 +331,9 @@ enum imx_error_t mkimxboot(const char *infile, const char *bootfile,
331 const char *outfile, struct imx_option_t opt) 331 const char *outfile, struct imx_option_t opt)
332{ 332{
333 /* Dump tables */ 333 /* Dump tables */
334 if(opt.fw_variant > VARIANT_COUNT) {
335 return IMX_ERROR;
336 }
334 dump_imx_dev_info("[INFO] "); 337 dump_imx_dev_info("[INFO] ");
335 /* compute MD5 sum of the file */ 338 /* compute MD5 sum of the file */
336 uint8_t file_md5sum[16]; 339 uint8_t file_md5sum[16];