diff --git a/host/host_common/commands.c b/host/host_common/commands.c index 968897892b..1203ac8f06 100644 --- a/host/host_common/commands.c +++ b/host/host_common/commands.c @@ -18,7 +18,7 @@ #define SUCCESS 0 #define FAILURE -1 -#define MAC_LENGTH 19 +#define MAC_LENGTH 18 #define MAX_SSID_LENGTH 32 #define MIN_PWD_LENGTH 8 #define MAX_PWD_LENGTH 64 @@ -512,8 +512,8 @@ int wifi_get_ap_config (esp_hosted_control_config_t *ap_config) } if (resp->resp_get_ap_config->bssid.data) { strncpy((char *)ap_config->station.bssid, - (char *)resp->resp_get_ap_config->bssid.data, MAC_LENGTH); - ap_config->station.bssid[MAC_LENGTH-1] = '\0'; + (char *)resp->resp_get_ap_config->bssid.data, BSSID_LENGTH); + ap_config->station.bssid[BSSID_LENGTH-1] = '\0'; } ap_config->station.channel = resp->resp_get_ap_config->chnl; diff --git a/host/stm32/app/control/control.h b/host/stm32/app/control/control.h index 76b2dd1360..e2bd45ba14 100644 --- a/host/stm32/app/control/control.h +++ b/host/stm32/app/control/control.h @@ -123,7 +123,7 @@ typedef enum control_path_events_s { #endif -#define WIFI_MAX_STR_LEN 19 +#define WIFI_MAX_STR_LEN 18 /** Exported Structures **/