Mercurial > pidgin
changeset 14602:7a8d6f5566cd
[gaim-migrate @ 17329]
Fix some more potential printf("%s", NULL) crashes due to changes in the
passport info MSN provides when signing in. This might break email
notifications for such cases, but that's better than crashing, right?
committer: Tailor Script <tailor@pidgin.im>
author | Stu Tomlinson <stu@nosnilmot.com> |
---|---|
date | Wed, 20 Sep 2006 11:52:35 +0000 |
parents | 9a989acb0601 |
children | f63d095dc421 |
files | libgaim/protocols/msn/notification.c |
diffstat | 1 files changed, 9 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/libgaim/protocols/msn/notification.c Wed Sep 20 11:49:38 2006 +0000 +++ b/libgaim/protocols/msn/notification.c Wed Sep 20 11:52:35 2006 +0000 @@ -999,17 +999,20 @@ gaim_account_get_username(account)); fprintf(fd, "<input type=\"hidden\" name=\"username\" value=\"%s\">\n", gaim_account_get_username(account)); - fprintf(fd, "<input type=\"hidden\" name=\"sid\" value=\"%s\">\n", - session->passport_info.sid); - fprintf(fd, "<input type=\"hidden\" name=\"kv\" value=\"%s\">\n", - session->passport_info.kv); + if (session->passport_info.sid != NULL) + fprintf(fd, "<input type=\"hidden\" name=\"sid\" value=\"%s\">\n", + session->passport_info.sid); + if (session->passport_info.kv != NULL) + fprintf(fd, "<input type=\"hidden\" name=\"kv\" value=\"%s\">\n", + session->passport_info.kv); fprintf(fd, "<input type=\"hidden\" name=\"id\" value=\"2\">\n"); fprintf(fd, "<input type=\"hidden\" name=\"sl\" value=\"%ld\">\n", time(NULL) - session->passport_info.sl); fprintf(fd, "<input type=\"hidden\" name=\"rru\" value=\"%s\">\n", rru); - fprintf(fd, "<input type=\"hidden\" name=\"auth\" value=\"%s\">\n", - session->passport_info.mspauth); + if (session->passport_info.mspauth != NULL) + fprintf(fd, "<input type=\"hidden\" name=\"auth\" value=\"%s\">\n", + session->passport_info.mspauth); fprintf(fd, "<input type=\"hidden\" name=\"creds\" value=\"%s\">\n", sendbuf); /* TODO Digest me (huh? -- ChipX86) */ fprintf(fd, "<input type=\"hidden\" name=\"svc\" value=\"mail\">\n");