diff options
-rw-r--r-- | minion/src/wifi_module.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/minion/src/wifi_module.cpp b/minion/src/wifi_module.cpp index ea509df..352cb79 100644 --- a/minion/src/wifi_module.cpp +++ b/minion/src/wifi_module.cpp @@ -183,7 +183,7 @@ auto WiFiModule::get_local_ip(char *local_ip_out) noexcept -> const char * return local_ip_out; } - auto *buf = util::malloc<char>(strlen(local_ip_out)); + auto *buf = util::malloc<char>(strlen(local_ip_out) + 1U); if (buf == nullptr) { @@ -208,7 +208,7 @@ auto WiFiModule::get_local_ip(char *local_ip_out) noexcept -> const char * return local_ip_out; } - const auto local_ip_end = strstr(buf, "\r\n+CIFSR:STAMAC"); + auto local_ip_end = strstr(buf, "\"\r\n+CIFSR:STAMAC"); if (local_ip_end == nullptr) { |