Mercurial > pidgin
changeset 7845:59f9508c9a31
[gaim-migrate @ 8499]
Sean got a really odd piece of MSNSLP data that wasn't documented anywhere
I looked, and it appeared to have no content-type.. or maybe something got
corrupted, but it looked pretty valid to me. Anyhow, this will prevent the
crash (at least at this stage), since we no longer assume a content type
exists.
committer: Tailor Script <tailor@pidgin.im>
author | Christian Hammond <chipx86@chipx86.com> |
---|---|
date | Sat, 13 Dec 2003 06:13:51 +0000 |
parents | a6298fd7ee21 |
children | 61c07fefe1fc |
files | src/protocols/msn/msg.c |
diffstat | 1 files changed, 5 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/src/protocols/msn/msg.c Sat Dec 13 02:49:45 2003 +0000 +++ b/src/protocols/msn/msg.c Sat Dec 13 06:13:51 2003 +0000 @@ -136,6 +136,7 @@ MsnMessage *msg; char *command_header; char *tmp_base, *msg_base, *tmp, *field1, *field2, *c; + const char *content_type; const char *c2; g_return_val_if_fail(str != NULL, NULL); @@ -244,7 +245,10 @@ tmp += 2; /* Now we *should* be at the body. */ - if (!strcmp(msn_message_get_content_type(msg), "application/x-msnmsgrp2p")) + content_type = msn_message_get_content_type(msg); + + if (content_type != NULL && + !strcmp(content_type, "application/x-msnmsgrp2p")) { char header[48]; char footer[4];