mirror of https://github.com/rusefi/wideband.git
bounds check flash writes
This commit is contained in:
parent
c711252791
commit
36f52312db
|
@ -156,6 +156,11 @@ void RunBootloaderLoop()
|
||||||
{
|
{
|
||||||
sendNak();
|
sendNak();
|
||||||
}
|
}
|
||||||
|
// Don't allow out of bounds writes
|
||||||
|
else if (embeddedData < 0 || embeddedData > 26 * 1024)
|
||||||
|
{
|
||||||
|
sendNak();
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Flash::Write(appFlashAddr + embeddedData, &frame.data8[0], frame.DLC);
|
Flash::Write(appFlashAddr + embeddedData, &frame.data8[0], frame.DLC);
|
||||||
|
|
Loading…
Reference in New Issue