out of bounds access in DLE encoder #492
|
@ -198,7 +198,7 @@ ReturnValue_t DleEncoder::decodeStreamEscaped(const uint8_t *sourceStream, size_
|
|||
break;
|
||||
}
|
||||
case(STX_CHAR): {
|
||||
*readLen = ++encodedIndex;
|
||||
*readLen = encodedIndex;
|
||||
mohr marked this conversation as resolved
Outdated
|
||||
return DECODING_ERROR;
|
||||
}
|
||||
case(ETX_CHAR): {
|
||||
|
|
Loading…
Reference in New Issue
Block a user
I think this should be
*readLen = encodedIndex;
, we should preserve theSTX
as it might start a new, valid frame.