# HG changeset patch # User Daniel Atallah # Date 1218248342 0 # Node ID 80ddf59e1585f57ddbd04f4b28fd04b042b3c5b8 # Parent 3c3032be12de779789460b6ab849d5fb7c691bc2 A similar size limit for MSN buddy icon retrieval from arbitrary urls. diff -r 3c3032be12de -r 80ddf59e1585 libpurple/protocols/msn/msn.c --- a/libpurple/protocols/msn/msn.c Sat Aug 09 01:58:27 2008 +0000 +++ b/libpurple/protocols/msn/msn.c Sat Aug 09 02:19:02 2008 +0000 @@ -48,6 +48,7 @@ #include "slplink.h" #if PHOTO_SUPPORT +#define MAX_HTTP_BUDDYICON_BYTES (200 * 1024) #include "imgstore.h" #endif @@ -1886,6 +1887,7 @@ purple_debug_info("msn", "In msn_got_info,url_text:{%s}\n",url_text); /* Make sure the connection is still valid */ + /* TODO: Instead of this, we should be canceling this when we disconnect */ if (g_list_find(purple_connections_get_all(), info_data->gc) == NULL) { purple_debug_warning("msn", "invalid connection. ignoring buddy info.\n"); @@ -2275,7 +2277,7 @@ /* Try to put the photo in there too, if there's one */ if (photo_url_text) { - purple_util_fetch_url(photo_url_text, FALSE, NULL, FALSE, msn_got_photo, + purple_util_fetch_url_len(photo_url_text, FALSE, NULL, FALSE, MAX_HTTP_BUDDYICON_BYTES, msn_got_photo, info2_data); } else @@ -2301,6 +2303,7 @@ char *photo_url_text = info2_data->photo_url_text; /* Make sure the connection is still valid if we got here by fetching a photo url */ + /* TODO: Instead of this, we should be canceling this when we disconnect */ if (url_text && (error_message != NULL || g_list_find(purple_connections_get_all(), info_data->gc) == NULL)) {