1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-04-30 23:24:49 +03:00

1 Commits

Author SHA1 Message Date
Earle F. Philhower, III
5bc3079217
Fix Updater potential overflow, add host tests ()
* Fix Updater potential overflow, add host tests

Fixes 

The Updater class could, when exactly 4K bytes were in the buffer but
not yet written to flash, allow overwriting data written to it beyond
the passed-in size parameter.

Fix per @jason-but's suggestion, and add a host test (plus minor changes
to Updater code to support host testing).

* Add missed mock file

* Remove most testing ifdefs fro updater

Per @mcspr's suggestion, we can pass in fake link symbols allowing
Updater to take the address of `_FS_start`/etc. even when building on
the host for testing.

There is still a single remaining wifi_set_power_mode ifdef'd and a
duplication of the digitalWrite/pinMode for testing vs. host building.

Co-authored-by: Develo <deveyes@gmail.com>
2020-01-08 17:38:28 -08:00