From aef3cd66bff0ee1c7bd9bfa823cb326e47d6af19 Mon Sep 17 00:00:00 2001 From: Markus Uhlin Date: Sat, 7 Mar 2026 12:12:57 +0100 Subject: psend_raw_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 11445d6..1a1f408 100644 --- a/FICS/utils.c +++ b/FICS/utils.c @@ -487,6 +487,11 @@ psend_raw_file(int p, const char *dir, const char *file) char tmp[MAX_LINE_SIZE] = { '\0' }; int num; + if (file == NULL || strcmp(file, "") == 0) { + warnx("%s: no file", __func__); + return -1; + } + if (dir) (void) snprintf(fname, sizeof fname, "%s/%s", dir, file); else -- cgit v1.2.3