summaryrefslogtreecommitdiff
path: root/Build/source
diff options
context:
space:
mode:
authorPeter Breitenlohner <peb@mppmu.mpg.de>2011-10-21 08:13:47 +0000
committerPeter Breitenlohner <peb@mppmu.mpg.de>2011-10-21 08:13:47 +0000
commite2e9bf0ede12f5587add897d7882ffe4c0d99995 (patch)
treeed5804a6b5e6aeefcb975d98ac88de940368df2f /Build/source
parentef241de779e2590aa519300f7281d6ca09fa2f6c (diff)
luatex: Correctly compute array size (from Werner Fink)
git-svn-id: svn://tug.org/texlive/trunk@24353 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source')
-rw-r--r--Build/source/texk/web2c/luatexdir/luafontloader/ChangeLog5
-rw-r--r--Build/source/texk/web2c/luatexdir/luafontloader/fontforge/fontforge/psread.c6
2 files changed, 8 insertions, 3 deletions
diff --git a/Build/source/texk/web2c/luatexdir/luafontloader/ChangeLog b/Build/source/texk/web2c/luatexdir/luafontloader/ChangeLog
index b21d051c62b..562bf5d6583 100644
--- a/Build/source/texk/web2c/luatexdir/luafontloader/ChangeLog
+++ b/Build/source/texk/web2c/luatexdir/luafontloader/ChangeLog
@@ -1,3 +1,8 @@
+2011-10-21 Werner Fink <werner@suse.de>
+
+ * fontforge/fontforge/psread.c (ioescapestopped): Correctly
+ compute `stack' array size.
+
2009-03-05 Peter Breitenlohner <peb@mppmu.mpg.de>
* ff-config.in: new configuration header replacing lots of
diff --git a/Build/source/texk/web2c/luatexdir/luafontloader/fontforge/fontforge/psread.c b/Build/source/texk/web2c/luatexdir/luafontloader/fontforge/fontforge/psread.c
index cb3b0676699..2f6c6ec2df5 100644
--- a/Build/source/texk/web2c/luatexdir/luafontloader/fontforge/fontforge/psread.c
+++ b/Build/source/texk/web2c/luatexdir/luafontloader/fontforge/fontforge/psread.c
@@ -385,7 +385,7 @@ return;
wrapper->top = io;
}
-static int ioescapestopped(IO *wrapper, struct psstack *stack, int sp) {
+static int ioescapestopped(IO *wrapper, struct psstack *stack, int sp, const size_t bsize) {
_IO *io = wrapper->top, *iop;
int wasstopped;
@@ -396,7 +396,7 @@ static int ioescapestopped(IO *wrapper, struct psstack *stack, int sp) {
free(io);
if ( wasstopped ) {
wrapper->top = iop;
- if ( sp<(int)(sizeof(stack)/sizeof(stack[0])) ) {
+ if ( sp<(int)bsize ) {
stack[sp].type = ps_bool;
stack[sp++].u.tf = true;
}
@@ -1609,7 +1609,7 @@ static void _InterpretPS(IO *wrapper, EntityChar *ec, RetStack *rs) {
}
break;
case pt_stop:
- sp = ioescapestopped(wrapper,stack,sp);
+ sp = ioescapestopped(wrapper,stack,sp,sizeof(stack)/sizeof(stack[0]));
break;
case pt_load:
if ( sp>=1 && stack[sp-1].type==ps_lit ) {