1
0
mirror of https://github.com/weechat/weechat.git synced 2026-06-27 13:26:38 +02:00

xfer: fix use of NULL pointer in strrchr()

This commit is contained in:
Sébastien Helleu
2023-10-30 12:09:57 +01:00
parent aa5c03334a
commit 3e78d55495
+1 -1
View File
@@ -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);