]> git.wh0rd.org - fontconfig.git/commitdiff
Fix incorrect size in memmove call in FcObjectSetAdd that crashed
authorKeith Packard <keithp@keithp.com>
Tue, 18 Jun 2002 16:47:12 +0000 (16:47 +0000)
committerKeith Packard <keithp@keithp.com>
Tue, 18 Jun 2002 16:47:12 +0000 (16:47 +0000)
    FcFontSetList calls

src/fclist.c

index 414af11b61884de294a7afd38820313b5d5931cb..5468b2a619598d46164f4a3aaf2626d387d5a9cc 100644 (file)
@@ -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;