View | Details | Raw Unified | Return to bug 202832 | Differences between
and this patch

Collapse All | Expand All

(-)libsylph/procmsg.c (-2 / +4 lines)
Lines 164-170 static gint procmsg_read_cache_data_str_ Link Here
164
	if (endp - *p < sizeof(len))
164
	if (endp - *p < sizeof(len))
165
		return -1;
165
		return -1;
166
166
167
	len = *(const guint32 *)(*p);
167
	memcpy(&len, *p, sizeof(len));
168
	*p += sizeof(len);
168
	*p += sizeof(len);
169
	if (len > G_MAXINT || len > endp - *p)
169
	if (len > G_MAXINT || len > endp - *p)
170
		return -1;
170
		return -1;
Lines 197-203 static gint procmsg_read_cache_data_str_ Link Here
197
		g_mapped_file_free(mapfile);			\
197
		g_mapped_file_free(mapfile);			\
198
		return NULL;					\
198
		return NULL;					\
199
	} else {						\
199
	} else {						\
200
		n = *(const guint32 *)p;			\
200
		guint32 v;					\
201
		memcpy(&v, p, sizeof(v));			\
202
		n = v;						\
201
		p += sizeof(guint32);				\
203
		p += sizeof(guint32);				\
202
	}							\
204
	}							\
203
}
205
}

Return to bug 202832