From 50bdca394975edbfb4197a60be3892f9c9b345c7 Mon Sep 17 00:00:00 2001 From: Markus Uhlin Date: Sat, 7 Mar 2026 12:31:00 +0100 Subject: psend_file: added null check --- FICS/utils.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'FICS') diff --git a/FICS/utils.c b/FICS/utils.c index 7cbb608..e0a68fa 100644 --- a/FICS/utils.c +++ b/FICS/utils.c @@ -532,6 +532,11 @@ psend_file(int p, const char *dir, const char *file) parray[p].last_file = NULL; parray[p].last_file_byte = 0L; + if (file == NULL || strcmp(file, "") == 0) { + warnx("%s: error: no file", __func__); + return -1; + } + if (dir) snprintf(fname, sizeof fname, "%s/%s", dir, file); else -- cgit v1.2.3