Mercurial > pidgin.yaz
comparison src/protocols/yahoo/yahoo.c @ 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 | 3e87f0c5287d |
children | a0969be53e17 |
comparison
equal
deleted
inserted
replaced
13460:ca43d58cdc43 | 13461:b6a63c9b0cb4 |
---|---|
674 { | 674 { |
675 GSList *l = pkt->hash; | 675 GSList *l = pkt->hash; |
676 GSList *list = NULL; | 676 GSList *list = NULL; |
677 struct _yahoo_im *im = NULL; | 677 struct _yahoo_im *im = NULL; |
678 | 678 |
679 char imv[16]; | 679 const char *imv = NULL; |
680 | 680 |
681 if (pkt->status <= 1 || pkt->status == 5) { | 681 if (pkt->status <= 1 || pkt->status == 5) { |
682 while (l != NULL) { | 682 while (l != NULL) { |
683 struct yahoo_pair *pair = l->data; | 683 struct yahoo_pair *pair = l->data; |
684 if (pair->key == 4) { | 684 if (pair->key == 4) { |
701 im->msg = pair->value; | 701 im->msg = pair->value; |
702 } | 702 } |
703 /* IMV key */ | 703 /* IMV key */ |
704 if (pair->key == 63) | 704 if (pair->key == 63) |
705 { | 705 { |
706 strcpy(imv, pair->value); | 706 imv = pair->value; |
707 } | 707 } |
708 l = l->next; | 708 l = l->next; |
709 } | 709 } |
710 } else if (pkt->status == 2) { | 710 } else if (pkt->status == 2) { |
711 gaim_notify_error(gc, NULL, | 711 gaim_notify_error(gc, NULL, |
712 _("Your Yahoo! message did not get sent."), NULL); | 712 _("Your Yahoo! message did not get sent."), NULL); |
713 } | 713 } |
714 | 714 |
715 /** TODO: It seems that this check should be per IM, not global */ | |
715 /* Check for the Doodle IMV */ | 716 /* Check for the Doodle IMV */ |
716 if(!strcmp(imv, "doodle;11")) | 717 if(im != NULL && imv != NULL && !strcmp(imv, "doodle;11")) |
717 { | 718 { |
718 GaimWhiteboard *wb; | 719 GaimWhiteboard *wb; |
719 | 720 |
720 if (!yahoo_privacy_check(gc, im->from)) { | 721 if (!yahoo_privacy_check(gc, im->from)) { |
721 gaim_debug_info("yahoo", "Doodle request from %s dropped.\n", im->from); | 722 gaim_debug_info("yahoo", "Doodle request from %s dropped.\n", im->from); |