From 086b32d62fb836a9b3651526a4a51b0070371269 Mon Sep 17 00:00:00 2001 From: Tony Cook Date: Fri, 1 Mar 2013 23:08:01 +1100 Subject: [PATCH] allocate the correct number of stack entries for glyph_names() Each of the drivers allocated count entries then attempted to use entry "count". Allocate count+1 entries instead --- FT2/FT2.xs | 2 +- Imager.xs | 2 +- T1/T1.xs | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/FT2/FT2.xs b/FT2/FT2.xs index 5ecdcd05..7b9a8b9f 100644 --- a/FT2/FT2.xs +++ b/FT2/FT2.xs @@ -303,7 +303,7 @@ i_ft2_glyph_name(handle, text_sv, utf8 = 0, reliable_only = 1) ch = *text++; --len; } - EXTEND(SP, count); + EXTEND(SP, count+1); if (i_ft2_glyph_name(handle, ch, name, sizeof(name), reliable_only)) { ST(count) = sv_2mortal(newSVpv(name, 0)); diff --git a/Imager.xs b/Imager.xs index 602d2f52..e5c44a21 100644 --- a/Imager.xs +++ b/Imager.xs @@ -2395,7 +2395,7 @@ i_tt_glyph_name(handle, text_sv, utf8 = 0) ch = *text++; --len; } - EXTEND(SP, count); + EXTEND(SP, count+1); if ((outsize = i_tt_glyph_name(handle, ch, name, sizeof(name))) != 0) { ST(count) = sv_2mortal(newSVpv(name, 0)); } diff --git a/T1/T1.xs b/T1/T1.xs index c38c516a..56348d5c 100644 --- a/T1/T1.xs +++ b/T1/T1.xs @@ -195,7 +195,7 @@ i_t1_glyph_names(font, text_sv, utf8 = 0) ch = *text++; --len; } - EXTEND(SP, count); + EXTEND(SP, count+1); if (i_t1_glyph_name(font, ch, name, sizeof(name))) { ST(count) = sv_2mortal(newSVpv(name, 0)); } -- 2.39.5