From 7912f7494bd75124f1b51a900756b6a78c0b846d Mon Sep 17 00:00:00 2001 From: iceman1001 Date: Sun, 14 Apr 2019 19:44:55 +0200 Subject: [PATCH] init array --- uart/uart_win32.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/uart/uart_win32.c b/uart/uart_win32.c index 2ed5c9bcf..789b430b9 100644 --- a/uart/uart_win32.c +++ b/uart/uart_win32.c @@ -49,7 +49,7 @@ typedef struct { } serial_port_windows; serial_port uart_open(const char *pcPortName, uint32_t speed) { - char acPortName[255]; + char acPortName[255] = {0}; serial_port_windows *sp = calloc(sizeof(serial_port_windows), sizeof(uint8_t)); if (sp == 0) {