From 44e222296843dafcdc43e6403442ab579dff8f56 Mon Sep 17 00:00:00 2001 From: Markus Uhlin Date: Sat, 16 Mar 2024 15:04:18 +0100 Subject: Initialized buffers with null chars --- FICS/utils.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'FICS') diff --git a/FICS/utils.c b/FICS/utils.c index c7d6774..deb2581 100644 --- a/FICS/utils.c +++ b/FICS/utils.c @@ -377,8 +377,8 @@ PUBLIC int psend_raw_file(int p, char *dir, char *file) { FILE *fp; - char fname[MAX_FILENAME_SIZE]; - char tmp[MAX_LINE_SIZE]; + char fname[MAX_FILENAME_SIZE] = { '\0' }; + char tmp[MAX_LINE_SIZE] = { '\0' }; int num; if (dir) @@ -402,8 +402,8 @@ PUBLIC int psend_file(int p, char *dir, char *file) { FILE *fp; - char fname[MAX_FILENAME_SIZE]; - char tmp[MAX_LINE_SIZE]; + char fname[MAX_FILENAME_SIZE] = { '\0' }; + char tmp[MAX_LINE_SIZE] = { '\0' }; int lcount = (parray[p].d_height - 1); if (parray[p].last_file) @@ -444,8 +444,8 @@ PUBLIC int psend_logoutfile(int p, char *dir, char *file) { FILE *fp; - char fname[MAX_FILENAME_SIZE]; - char tmp[MAX_LINE_SIZE]; + char fname[MAX_FILENAME_SIZE] = { '\0' }; + char tmp[MAX_LINE_SIZE] = { '\0' }; if (parray[p].last_file) rfree(parray[p].last_file); -- cgit v1.2.3