Skip to content

If Firmware size does not match file size, device is still flashed #31

Description

@neurondigital

If I on purpose send the wrong file size in the start command.
The device sends a NACK as expected, then sends an ACK right after.
The device is updated, even though the file size does not match the size written.

The issue seems to happen in this line:


if (_file_written != _file_size) {
        sendCommandAnswer(STOP_OTA, NACK);
      }

perhaps you need to add a return:

if (_file_written != _file_size) {
        sendCommandAnswer(STOP_OTA, NACK);
        return;
 }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions