[cairo-commit] src/cairo-truetype-subset.c

Adrian Johnson ajohnson at kemper.freedesktop.org
Tue Mar 13 01:09:23 PDT 2007


 src/cairo-truetype-subset.c |    2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)

New commits:
diff-tree a944f42b3d58825e8def292001e3738651b7584a (from 0f78eb8ccf60c60a4b66441958a7498dc9f7fa47)
Author: Adrian Johnson <ajohnson at redneon.com>
Date:   Tue Mar 13 18:35:59 2007 +1030

    Fix buffer overflow warning

diff --git a/src/cairo-truetype-subset.c b/src/cairo-truetype-subset.c
old mode 100644
new mode 100755
index e4108a6..7e77bb8
--- a/src/cairo-truetype-subset.c
+++ b/src/cairo-truetype-subset.c
@@ -658,7 +658,7 @@ cairo_truetype_font_write_post_table (ca
         cairo_truetype_font_write_be16 (font, i + 257);
 
     for (i = 1; i < font->base.num_glyphs; i++) {
-        n = snprintf(buf + 1, 10, "g%d", i - 1);
+        n = snprintf(buf + 1, 9, "g%d", i - 1);
         buf[0] = n;
         cairo_truetype_font_write (font, buf, n + 1);
     }


More information about the cairo-commit mailing list