[gaim-migrate @ 15506]

Tue, 07 Feb 2006 01:43:27 +0000

author
Evan Schoenberg <evands@pidgin.im>
date
Tue, 07 Feb 2006 01:43:27 +0000
changeset 13144
e8c3eafab5f8
parent 13143
d0a29ff182c8
child 13145
42f870dead30

[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: Richard Laager <rlaager@pidgin.im>

src/protocols/yahoo/yahoo_filexfer.c file | annotate | diff | comparison | revisions
--- 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);

mercurial