1
0
mirror of https://github.com/weechat/weechat.git synced 2026-06-30 23:06: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 f8c459453d
commit 4d884729f9
+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);