diff options
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/tist.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/plugins/tist.c b/plugins/tist.c index 28498b61..b8c89cfd 100644 --- a/plugins/tist.c +++ b/plugins/tist.c @@ -115,14 +115,14 @@ static int read_baud_rate(unsigned long *baud) return err; } -static int read_uart_name(char uart_name[]) +static int read_uart_name(char uart_name[], size_t uart_name_len) { int err; FILE *f; DBG(""); - memset(uart_name, 0, sizeof(uart_name)); + memset(uart_name, 0, uart_name_len); f = fopen(TIST_SYSFS_UART, "r"); if (f == NULL) @@ -510,7 +510,7 @@ static int tist_init(void) int fd, err; gsize len; - err = read_uart_name(uart_dev_name); + err = read_uart_name(uart_dev_name, sizeof(uart_dev_name)); if (err < 0) { connman_error("Could not read the UART name"); return err; |