Another bug found by valgrind.
This commit is contained in:
parent
272efcbdc4
commit
fa4c85eba5
4
mode_s.c
4
mode_s.c
|
@ -1753,9 +1753,11 @@ void detectModeS(uint16_t *m, uint32_t mlen) {
|
|||
}
|
||||
|
||||
// Ensure msglen is consistent with the DF type
|
||||
if (msglen > 0) {
|
||||
i = modesMessageLenByType(msg[0] >> 3);
|
||||
if (msglen > i) {msglen = i;}
|
||||
else if (msglen < i) {msglen = 0;}
|
||||
}
|
||||
|
||||
//
|
||||
// If we guessed at any of the bits in the DF type field, then look to see if our guess was sensible.
|
||||
|
@ -2256,9 +2258,11 @@ void detectModeS_oversample(uint16_t *m, uint32_t mlen) {
|
|||
}
|
||||
|
||||
// Ensure msglen is consistent with the DF type
|
||||
if (msglen > 0) {
|
||||
i = modesMessageLenByType(msg[0] >> 3);
|
||||
if (msglen > i) {msglen = i;}
|
||||
else if (msglen < i) {msglen = 0;}
|
||||
}
|
||||
|
||||
//
|
||||
// If we guessed at any of the bits in the DF type field, then look to see if our guess was sensible.
|
||||
|
|
Loading…
Reference in a new issue