Skip to content

Commit a0fbaed

Browse files
committed
Uninitialized stack object can have unintended bad values
1 parent 7ab1f61 commit a0fbaed

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cores/esp8266/HardwareSerial.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ unsigned long HardwareSerial::testBaudrate()
133133
unsigned long HardwareSerial::detectBaudrate(time_t timeoutMillis)
134134
{
135135
esp8266::polledTimeout::oneShotFastMs timeOut(timeoutMillis);
136-
unsigned long detectedBaudrate;
136+
unsigned long detectedBaudrate = 0;
137137
while (!timeOut) {
138138
if ((detectedBaudrate = testBaudrate())) {
139139
break;

0 commit comments

Comments
 (0)