summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSébastien Helleu <flashcode@flashtux.org>2023-10-30 12:09:57 +0100
committerSébastien Helleu <flashcode@flashtux.org>2023-10-30 23:10:54 +0100
commit4d884729f9c5fe189c48600ad7fa2d4fb3d0fd88 (patch)
tree6bc05f5d19cc55e6b444d3329924765c9c059ff9
parentf8c459453d4fcc705a676b38deccdfa549996e94 (diff)
downloadweechat-4d884729f9c5fe189c48600ad7fa2d4fb3d0fd88.zip
xfer: fix use of NULL pointer in strrchr()
-rw-r--r--src/plugins/xfer/xfer.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/plugins/xfer/xfer.c b/src/plugins/xfer/xfer.c
index 317cd4277..d775f7512 100644
--- a/src/plugins/xfer/xfer.c
+++ b/src/plugins/xfer/xfer.c
@@ -1330,7 +1330,7 @@ xfer_add_cb (const void *pointer, void *data,
}
}
- if (XFER_IS_FILE(type))
+ if (XFER_IS_FILE(type) && filename2)
{
/* extract short filename (without path) */
pos = strrchr (filename2, DIR_SEPARATOR_CHAR);