From 2f94aa373e4329dc6d3f103f21333c4e08e95355 Mon Sep 17 00:00:00 2001 From: Colomban Wendling Date: Fri, 25 May 2012 19:44:17 +0200 Subject: [PATCH] Fix incomplete copy in tm_tags_merge() that lead to crashes --- tagmanager/tm_tag.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tagmanager/tm_tag.c b/tagmanager/tm_tag.c index e143e994..848f6d9a 100644 --- a/tagmanager/tm_tag.c +++ b/tagmanager/tm_tag.c @@ -600,7 +600,7 @@ gboolean tm_tags_merge(GPtrArray *tags_array, gsize orig_len, tags_array->pdata[i] = (cmp >= 0) ? *a-- : *b--; if (a < tags_array->pdata) { - memcpy(tags_array->pdata, copy, b - copy); + memcpy(tags_array->pdata, copy, (b - copy) * sizeof(gpointer)); break; } if (b < copy)