Fix Savannah bug #30053. * src/cff/cffparse (cff_parse_real): Handle border case where `fraction_length' has value 10.
diff --git a/ChangeLog b/ChangeLog
index a7375f6..df72e09 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2010-06-08 Werner Lemberg <wl@gnu.org>
+
+ Fix Savannah bug #30053.
+
+ * src/cff/cffparse (cff_parse_real): Handle border case where
+ `fraction_length' has value 10.
+
2010-06-07 Werner Lemberg <wl@gnu.org>
Fix Savannah bug #30052.
diff --git a/src/cff/cffparse.c b/src/cff/cffparse.c
index e57c75f..659b427 100644
--- a/src/cff/cffparse.c
+++ b/src/cff/cffparse.c
@@ -335,6 +335,13 @@
fraction_length += integer_length;
}
+ /* this can only happen if exponent was non-zero */
+ if ( fraction_length == 10 )
+ {
+ number /= 10;
+ fraction_length -= 1;
+ }
+
/* Convert into 16.16 format. */
if ( fraction_length > 0 )
{