From 8241958d997b1fc0f02ed9bdaed6b90021292401 Mon Sep 17 00:00:00 2001 From: beegee-tokyo Date: Fri, 7 Apr 2023 19:24:16 +0800 Subject: [PATCH] Fix value overflow in AT command AT+MASK --- CHANGELOG.md | 2 ++ README.md | 2 ++ library.json | 2 +- library.properties | 2 +- src/at_cmd.cpp | 4 ++-- 5 files changed, 8 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d8aeb2e..5e54a42 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,8 @@ Arduino library for RAKWireless WisBlock Core modules that takes all the LoRaWAN # Release Notes +## 2.0.3 Fix value overflow + - Fix value overflow in AT command AT+MASK ## 2.0.2 Fix P2P bandwidths - Fix wrong mapping for RUI3 bandwidths to WisBlock API bandwidths - Change status output (separate LoRaWAN and P2P) diff --git a/README.md b/README.md index e636bda..21292a0 100644 --- a/README.md +++ b/README.md @@ -1175,6 +1175,8 @@ AT Command functions: Taylor Lee (taylor.lee@rakwireless.com) ---- # Changelog [Code releases](CHANGELOG.md) +- 2023-04-07 + - Fix value overflow in AT command AT+MASK - 2023-03-18 - Change status output (separate LoRaWAN and P2P) - 2023-02-16 diff --git a/library.json b/library.json index 40d2a10..9a29ead 100644 --- a/library.json +++ b/library.json @@ -1,6 +1,6 @@ { "name": "WisBlock-API-V2", - "version": "2.0.2", + "version": "2.0.3", "keywords": [ "lora", "Semtech", diff --git a/library.properties b/library.properties index e82372f..4204e0a 100644 --- a/library.properties +++ b/library.properties @@ -1,5 +1,5 @@ name=WisBlock-API-V2 -version=2.0.2 +version=2.0.3 author=Bernd Giesecke maintainer=Bernd Giesecke sentence=API for WisBlock Core module diff --git a/src/at_cmd.cpp b/src/at_cmd.cpp index a20d849..e02780e 100644 --- a/src/at_cmd.cpp +++ b/src/at_cmd.cpp @@ -790,14 +790,14 @@ static int at_exec_mask(char *str) return AT_ERRNO_NOALLOW; } char *param; - uint8_t mask; + uint16_t mask; param = strtok(str, ","); if (param != NULL) { mask = strtol(param, NULL, 0); - uint8_t maxBand = 1; + uint16_t maxBand = 1; switch (g_lorawan_settings.lora_region) { case LORAMAC_REGION_AU915: