Skip to content

Instantly share code, notes, and snippets.

@manuelm
Created August 1, 2023 23:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save manuelm/bf410d3748bf6c8895cc80132ee4796f to your computer and use it in GitHub Desktop.
Save manuelm/bf410d3748bf6c8895cc80132ee4796f to your computer and use it in GitHub Desktop.
diff --git a/src/cloud_request.c b/src/cloud_request.c
index 5aeb88a..1de4cc3 100644
--- a/src/cloud_request.c
+++ b/src/cloud_request.c
@@ -346,7 +346,7 @@ int_t cloud_request(const char *server, int port, bool https, const char *uri, c
if (!binary)
{
// Properly terminate the string with a NULL character
- buffer[maxSize] = '\0';
+ buffer[length] = '\0';
// Dump HTTP response body
TRACE_INFO("Response: '%s'\r\n", buffer);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment