From: Keith Packard Date: Tue, 18 Jun 2002 16:47:12 +0000 (+0000) Subject: Fix incorrect size in memmove call in FcObjectSetAdd that crashed X-Git-Tag: fcpackage_rc1~43 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=5b1bfa5d82aeb67056a38e93e22f69c4bfe4ce5b;p=fontconfig.git Fix incorrect size in memmove call in FcObjectSetAdd that crashed FcFontSetList calls --- 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;