summaryrefslogtreecommitdiff
blob: ee6eb3bde391c4f0027fde178d69c7256068bc16 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
https://bugs.gentoo.org/264607
https://bugs.gentoo.org/244888

--- centerim-4.22.7/libgadu/events.c
+++ centerim-4.22.7/libgadu/events.c
@@ -578,7 +578,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(GG_DEBUG_MISC, "// gg_watch_fd_connected() not enough memory for notify data\n");
 							goto fail;