From 5b1bfa5d82aeb67056a38e93e22f69c4bfe4ce5b Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Tue, 18 Jun 2002 16:47:12 +0000 Subject: [PATCH] Fix incorrect size in memmove call in FcObjectSetAdd that crashed FcFontSetList calls --- src/fclist.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/fclist.c b/src/fclist.c index 414af11..5468b2a 100644 --- a/src/fclist.c +++ b/src/fclist.c @@ -80,7 +80,8 @@ FcObjectSetAdd (FcObjectSet *os, const char *object) } if (c < 0) mid++; - memmove (os->objects + mid + 1, os->objects + mid, os->nobject - mid); + memmove (os->objects + mid + 1, os->objects + mid, + (os->nobject - mid) * sizeof (const char *)); os->objects[mid] = object; os->nobject++; return FcTrue; -- 2.39.5