diff options
author | Tomer Shalev <shalev.tomer@gmail.com> | 2009-11-01 18:26:00 +0000 |
---|---|---|
committer | Tomer Shalev <shalev.tomer@gmail.com> | 2009-11-01 18:26:00 +0000 |
commit | bcadf96066c20953ae6be7447f1ee2cd8742ab4f (patch) | |
tree | 422ba0e39a5275103eee185b2fd63e4120a87058 /rbutil/rbutilqt/base/bootloaderinstalltcc.cpp | |
parent | 50edc5819ea22c9635bfdc7459a1cd7bcd6d82fa (diff) |
FS#10740 - rbutil: Test Cowon D2 OF file for CRC consistency before patching
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23470 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'rbutil/rbutilqt/base/bootloaderinstalltcc.cpp')
-rw-r--r-- | rbutil/rbutilqt/base/bootloaderinstalltcc.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/rbutil/rbutilqt/base/bootloaderinstalltcc.cpp b/rbutil/rbutilqt/base/bootloaderinstalltcc.cpp index 1d0a9e606e..525421defe 100644 --- a/rbutil/rbutilqt/base/bootloaderinstalltcc.cpp +++ b/rbutil/rbutilqt/base/bootloaderinstalltcc.cpp @@ -81,6 +81,14 @@ void BootloaderInstallTcc::installStage2(void) goto exit; } + /* A CRC test in order to reject non OF file */ + if (test_firmware_tcc(of_buf, of_size)) + { + emit logItem(errstr, LOGERROR); + emit logItem(tr("Unknown OF file used: %1").arg(m_offile), LOGERROR); + goto exit; + } + /* Load bootloader file */ boot_buf = file_read(bootfile.toLocal8Bit().data(), &boot_size); if (boot_buf == NULL) |