# HG changeset patch # User Richard Laager # Date 1139276607 0 # Node ID a1d5f154585b924cd1de5aec404e69ddf17b3d5a # Parent 386a4f784cde67158cd2d9bd8350d824f602f02c [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 diff -r 386a4f784cde -r a1d5f154585b src/protocols/yahoo/yahoo_filexfer.c --- 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);