--------------------------------------------
On Thu, 21/7/16, Werner LEMBERG <[email protected]> wrote:
>> BTW,
I think line 4010 is missing a "def->end =
exc->IP;"
> line.
"def->end" is not used except for bound
checking, (though
> precisely because it
is used for that, I did put it in my diagnostic
> patch set) so it is probably not
important, but you might still want
> to
add that line, to match how it looks around line 3715.
> Will add. Patch, please.
Here is the patch. But now that I look at it again, it seems strange that the
bound check
in JMPR is never triggered - do people never jump inside an IDEF? I suppose
IDEF itself
is rare enough.
From 44195d302e227e53fb3d36655e1f09aefe905b92 Mon Sep 17 00:00:00 2001
From: Hin-Tak Leung <[email protected]>
Date: Thu, 21 Jul 2016 21:13:03 +0100
Subject: [PATCH] [truetype] Record the end of IDEFs
To match the logic in FDEF. The value of the end is only used
for bound-checking in Ins_JMPR(), so it may not have been obvious
that it was not recorded. Tested (as part of Font Validator 2.0)
all the fonts on Fedora and did not see any change.
* src/truetype/ttinterp.c (Ins_IDEF): Updated.
Signed-off-by: Hin-Tak Leung <[email protected]>
---
ChangeLog | 11 +++++++++++
src/truetype/ttinterp.c | 1 +
2 files changed, 12 insertions(+)
diff --git a/ChangeLog b/ChangeLog
index 616fdec..73b013a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+2016-07-21 Hin-Tak Leung <[email protected]>
+
+ [truetype] Record the end of IDEFs
+
+ To match the logic in FDEF. The value of the end is only used
+ for bound-checking in Ins_JMPR(), so it may not have been obvious
+ that it was not recorded. Tested (as part of Font Validator 2.0)
+ all the fonts on Fedora and did not see any change.
+
+ * src/truetype/ttinterp.c (Ins_IDEF): Updated.
+
2016-07-19 Werner Lemberg <[email protected]>
[truetype] Sanitizer fix, second try.
diff --git a/src/truetype/ttinterp.c b/src/truetype/ttinterp.c
index eb6025f..8027b0d 100644
--- a/src/truetype/ttinterp.c
+++ b/src/truetype/ttinterp.c
@@ -4008,6 +4008,7 @@
exc->error = FT_THROW( Nested_DEFS );
return;
case 0x2D: /* ENDF */
+ def->end = exc->IP;
return;
}
}
--
2.7.4
_______________________________________________
Freetype-devel mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/freetype-devel