Skip to content

Commit feb394d

Browse files
committed
HttpChunkReader: initialize array
1 parent 20dd26b commit feb394d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/AudioTools/CoreAudio/AudioHttp/HttpChunkReader.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,12 +101,12 @@ class HttpChunkReader : public HttpLineReader {
101101
// we read the chunk length which is indicated as hex value
102102
virtual void readChunkLen(Client &client) {
103103
LOGD("HttpChunkReader::readChunkLen");
104-
uint8_t len_str[HTTP_CHUNKED_SIZE_MAX_LEN+1];
104+
uint8_t len_str[HTTP_CHUNKED_SIZE_MAX_LEN+1] = {0};
105105
readlnInternal(client, len_str, HTTP_CHUNKED_SIZE_MAX_LEN, false);
106106
LOGD("HttpChunkReader::readChunkLen %s", (const char *)len_str);
107107
open_chunk_len = strtol((char *)len_str, nullptr, 16);
108108

109-
char msg[80];
109+
char msg[80] = {0};
110110
snprintf(msg, 80, "chunk_len: %d", open_chunk_len);
111111
LOGD("HttpChunkReader::readChunkLen->%s", msg);
112112

0 commit comments

Comments
 (0)