mirror of https://github.com/arendst/Tasmota.git
Add safe-guard in getNumFromBits()
This commit is contained in:
parent
c8b5750568
commit
609e7369bd
|
@ -420,6 +420,7 @@ int32_t Unishox::getNumFromBits(uint32_t count) {
|
||||||
while (count--) {
|
while (count--) {
|
||||||
ret += getNextBit() << count;
|
ret += getNextBit() << count;
|
||||||
}
|
}
|
||||||
|
if (in_eof) return 0;
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue