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:
parent
ec7ae4ed44
commit
c37903c33b
@ -133,7 +133,7 @@ unsigned long HardwareSerial::testBaudrate()
|
|||||||
unsigned long HardwareSerial::detectBaudrate(time_t timeoutMillis)
|
unsigned long HardwareSerial::detectBaudrate(time_t timeoutMillis)
|
||||||
{
|
{
|
||||||
esp8266::polledTimeout::oneShotFastMs timeOut(timeoutMillis);
|
esp8266::polledTimeout::oneShotFastMs timeOut(timeoutMillis);
|
||||||
unsigned long detectedBaudrate;
|
unsigned long detectedBaudrate = 0;
|
||||||
while (!timeOut) {
|
while (!timeOut) {
|
||||||
if ((detectedBaudrate = testBaudrate())) {
|
if ((detectedBaudrate = testBaudrate())) {
|
||||||
break;
|
break;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user