mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-11-21 02:52:50 -05:00
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
This commit is contained in:
parent
c4183e1d67
commit
1e2c6506fb
2 changed files with 4 additions and 0 deletions
|
|
@ -331,6 +331,9 @@ enum imx_error_t mkimxboot(const char *infile, const char *bootfile,
|
||||||
const char *outfile, struct imx_option_t opt)
|
const char *outfile, struct imx_option_t opt)
|
||||||
{
|
{
|
||||||
/* Dump tables */
|
/* Dump tables */
|
||||||
|
if(opt.fw_variant > VARIANT_COUNT) {
|
||||||
|
return IMX_ERROR;
|
||||||
|
}
|
||||||
dump_imx_dev_info("[INFO] ");
|
dump_imx_dev_info("[INFO] ");
|
||||||
/* compute MD5 sum of the file */
|
/* compute MD5 sum of the file */
|
||||||
uint8_t file_md5sum[16];
|
uint8_t file_md5sum[16];
|
||||||
|
|
|
||||||
|
|
@ -49,6 +49,7 @@ void BootloaderThreadImx::run(void)
|
||||||
struct imx_option_t opt;
|
struct imx_option_t opt;
|
||||||
opt.debug = false;
|
opt.debug = false;
|
||||||
opt.output = IMX_DUALBOOT;
|
opt.output = IMX_DUALBOOT;
|
||||||
|
opt.fw_variant = VARIANT_DEFAULT;
|
||||||
|
|
||||||
m_error = mkimxboot(m_inputfile.toLocal8Bit().constData(),
|
m_error = mkimxboot(m_inputfile.toLocal8Bit().constData(),
|
||||||
m_bootfile.toLocal8Bit().constData(),
|
m_bootfile.toLocal8Bit().constData(),
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue