1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-04-19 23:22:16 +03:00

Uninitialized stack object can have unintended bad values (#6846)

This commit is contained in:
Dirk O. Kaar 2019-11-28 00:27:52 +01:00 committed by Develo
parent ec7ae4ed44
commit c37903c33b

View File

@ -133,7 +133,7 @@ unsigned long HardwareSerial::testBaudrate()
unsigned long HardwareSerial::detectBaudrate(time_t timeoutMillis)
{
esp8266::polledTimeout::oneShotFastMs timeOut(timeoutMillis);
unsigned long detectedBaudrate;
unsigned long detectedBaudrate = 0;
while (!timeOut) {
if ((detectedBaudrate = testBaudrate())) {
break;