Mercurial > pidgin.yaz
changeset 31502:d2d6668bde34
Fix a crash on receiving a file with no preview that I just introduced
with the new functions. The preview pointer/size was left
uninitialized if there wasn't one.
author | Elliott Sales de Andrade <qulogic@pidgin.im> |
---|---|
date | Sun, 19 Dec 2010 20:30:38 +0000 |
parents | 82f1e6a70b11 |
children | 008b24923a77 |
files | libpurple/protocols/msn/xfer.c |
diffstat | 1 files changed, 3 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/libpurple/protocols/msn/xfer.c Sun Dec 19 18:37:10 2010 +0000 +++ b/libpurple/protocols/msn/xfer.c Sun Dec 19 20:30:38 2010 +0000 @@ -225,6 +225,9 @@ if (header->type == 0 && len > header->length) { header->preview_len = len - header->length; header->preview = g_memdup(buf, header->preview_len); + } else { + header->preview_len = 0; + header->preview = NULL; } return header;