File bug-525528_libgadu-CVE-2008-4776.patch of Package kdenetwork4
--- kopete/protocols/gadu/libgadu/events.c
+++ kopete/protocols/gadu/libgadu/events.c
@@ -596,7 +596,7 @@
if (GG_S_D(n->status)) {
unsigned char descr_len = *((char*) n + sizeof(struct gg_notify_reply60));
- if (descr_len < length) {
+ if (sizeof(struct gg_notify_reply60) + descr_len <= length) {
if (!(e->event.notify60[i].descr = malloc(descr_len + 1))) {
gg_debug_session(sess, GG_DEBUG_MISC, "// gg_watch_fd_connected() not enough memory for notify data\n");
goto fail;