changeset 13143:a1d5f154585b

[gaim-migrate @ 15506] SF Patch #1415729 from Evan "I've received a few crash reports in which yahoo_receivefile_connected() crashes in g_strdup_printf() as a result of being passed a NULL string. There are only two arguments to that call... xd->path and xd->host. If either were null for some reason, we couldn't receive a file, anyways, since we need both to do the HTTP GET request. This patch checks against NULL for both and cancels the transfer in the same manner it would be canceled if fed a negative (invalid) source." committer: Tailor Script <tailor@pidgin.im>
author Richard Laager <rlaager@wiktel.com>
date Tue, 07 Feb 2006 01:43:27 +0000
parents 386a4f784cde
children e90e8655290d
files src/protocols/yahoo/yahoo_filexfer.c
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/protocols/yahoo/yahoo_filexfer.c	Tue Feb 07 01:21:38 2006 +0000
+++ b/src/protocols/yahoo/yahoo_filexfer.c	Tue Feb 07 01:43:27 2006 +0000
@@ -64,7 +64,7 @@
 		return;
 	if (!(xd = xfer->data))
 		return;
-	if (source < 0) {
+	if ((source < 0) || (xd->path == NULL) || (xd->host == NULL)) {
 		gaim_xfer_error(GAIM_XFER_RECEIVE, gaim_xfer_get_account(xfer),
 				xfer->who, _("Unable to connect."));
 		gaim_xfer_cancel_remote(xfer);