--- a/src/protocols/yahoo/yahoo.c Mon Nov 11 21:04:33 2002 -0500
+++ b/src/protocols/yahoo/yahoo.c Sat Nov 23 13:50:47 2002 -0500
@@ -259,19 +259,20 @@
pair->key = strtol(key, NULL, 10);
accept = x; /* if x is 0 there was no key, so don't accept it */
+ if (len - pos + 1 <= 0) { + /* Truncated. Garbage or something. */ value = g_malloc(len - pos + 1);
- while (pos + 1 < len) {
- if (data[pos] == 0xc0 && data[pos + 1] == 0x80)
+ while (pos + 1 < len) { + if (data[pos] == 0xc0 && data[pos + 1] == 0x80) value[x++] = data[pos++];
pair->value = g_strdup(value);
pkt->hash = g_slist_append(pkt->hash, pair);
@@ -279,6 +280,11 @@
+ /* Skip over garbage we've noticed in the mail notifications */ + if (data[0] == '9' && data[pos] == 0x01)