Skip to content

Commit 23455dc

Browse files
NicolasdejeanFokkeZB
authored andcommitted
fixed buffer-overflow (#157)
1 parent aefd05b commit 23455dc

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/TheThingsNetwork.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -557,7 +557,7 @@ void TheThingsNetwork::valueToShow(uint8_t index, const char *value) {
557557

558558
void TheThingsNetwork::configureEU868(uint8_t sf) {
559559
uint8_t ch;
560-
char dr[1];
560+
char dr[2];
561561
uint32_t freq = 867100000;
562562

563563
uint32_t tmp;
@@ -615,7 +615,7 @@ void TheThingsNetwork::configureEU868(uint8_t sf) {
615615

616616
void TheThingsNetwork::configureUS915(uint8_t sf, uint8_t fsb) {
617617
uint8_t ch;
618-
char dr[1];
618+
char dr[2];
619619
uint8_t chLow = fsb > 0 ? (fsb - 1) * 8 : 0;
620620
uint8_t chHigh = fsb > 0 ? chLow + 7 : 71;
621621
uint8_t ch500 = fsb + 63;

0 commit comments

Comments
 (0)