changeset 13461:b6a63c9b0cb4

[gaim-migrate @ 15836] Fix CID 30 and 31 (NULL deref.) committer: Tailor Script <tailor@pidgin.im>
author Daniel Atallah <daniel.atallah@gmail.com>
date Wed, 08 Mar 2006 04:45:53 +0000
parents ca43d58cdc43
children f9ec1d1f497a
files src/protocols/yahoo/yahoo.c
diffstat 1 files changed, 4 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/src/protocols/yahoo/yahoo.c	Wed Mar 08 04:29:39 2006 +0000
+++ b/src/protocols/yahoo/yahoo.c	Wed Mar 08 04:45:53 2006 +0000
@@ -676,7 +676,7 @@
 	GSList *list = NULL;
 	struct _yahoo_im *im = NULL;
 
-	char imv[16];
+	const char *imv = NULL;
 
 	if (pkt->status <= 1 || pkt->status == 5) {
 		while (l != NULL) {
@@ -703,7 +703,7 @@
 			/* IMV key */
 			if (pair->key == 63)
 			{
-				strcpy(imv, pair->value);
+				imv = pair->value;
 			}
 			l = l->next;
 		}
@@ -712,8 +712,9 @@
 		                  _("Your Yahoo! message did not get sent."), NULL);
 	}
 
+	/** TODO: It seems that this check should be per IM, not global */
 	/* Check for the Doodle IMV */
-	if(!strcmp(imv, "doodle;11"))
+	if(im != NULL && imv != NULL && !strcmp(imv, "doodle;11"))
 	{
 		GaimWhiteboard *wb;