Browse Source

Fix incorrect memory access in Sequans Monarch code

The mux value is corrected if it is out of the supported range, but the uncorrected value was used to store the connection object. This caused subsequent dereferences of the corrected mux index to access incorrect data or dereference a null pointer.
dependabot/github_actions/actions/checkout-4
Ivo Smits 3 years ago
committed by GitHub
parent
commit
a092bfa636
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      src/TinyGsmClientSequansMonarch.h

+ 1
- 1
src/TinyGsmClientSequansMonarch.h View File

@ -98,7 +98,7 @@ class TinyGsmSequansMonarch
} else {
this->mux = (mux % TINY_GSM_MUX_COUNT) + 1;
}
at->sockets[mux % TINY_GSM_MUX_COUNT] = this;
at->sockets[this->mux % TINY_GSM_MUX_COUNT] = this;
return true;
}


Loading…
Cancel
Save