summaryrefslogtreecommitdiffstats
path: root/office/texlive/branch2011/07-fix_memory_corruption_from_r23592.patch
diff options
context:
space:
mode:
Diffstat (limited to 'office/texlive/branch2011/07-fix_memory_corruption_from_r23592.patch')
-rw-r--r--office/texlive/branch2011/07-fix_memory_corruption_from_r23592.patch49
1 files changed, 49 insertions, 0 deletions
diff --git a/office/texlive/branch2011/07-fix_memory_corruption_from_r23592.patch b/office/texlive/branch2011/07-fix_memory_corruption_from_r23592.patch
new file mode 100644
index 0000000000..e466312c28
--- /dev/null
+++ b/office/texlive/branch2011/07-fix_memory_corruption_from_r23592.patch
@@ -0,0 +1,49 @@
+r24347 | karl | 2011-10-20 23:54:25 +0000 (Thu, 20 Oct 2011) | 1 line
+
+branch2011: import memory corruption, part of r23592, per Hironori Kitagawa, 19 Oct 2011 07:44:35
+
+Index: Build/source/texk/web2c/ptexdir/ptex-base.ch
+===================================================================
+--- Build/source/texk/web2c/ptexdir/ptex-base.ch (revision 24346)
++++ Build/source/texk/web2c/ptexdir/ptex-base.ch (revision 24347)
+@@ -5855,6 +5855,9 @@
+ var @!jc:KANJI_code; {temporary register for KANJI}
+ @!sp,@!mp,@!ep:pointer;
+ begin@/
++if f=null_font then
++ begin get_jfm_pos:=kchar_type(null_font)(0); return;
++ end;
+ jc:=toDVI(kcode);
+ sp:=1; { start position }
+ ep:=font_num_ext[f]-1; { end position }
+@@ -6684,11 +6687,13 @@
+ goto main_loop_j+3;
+ @#
+ main_loop_j+1: space_factor:=1000;
+- fast_get_avail(main_p); font(main_p):=main_f; character(main_p):=cur_l;
+- link(tail):=main_p; tail:=main_p; last_jchr:=tail;
+- fast_get_avail(main_p); info(main_p):=KANJI(cur_chr);
+- link(tail):=main_p; tail:=main_p;
+- cx:=cur_chr; @<Insert kinsoku penalty@>;
++ if main_f<>null_font then
++ begin fast_get_avail(main_p); font(main_p):=main_f; character(main_p):=cur_l;
++ link(tail):=main_p; tail:=main_p; last_jchr:=tail;
++ fast_get_avail(main_p); info(main_p):=KANJI(cur_chr);
++ link(tail):=main_p; tail:=main_p;
++ cx:=cur_chr; @<Insert kinsoku penalty@>;
++ end;
+ ins_kp:=false;
+ again_2:
+ get_next;
+@@ -6724,7 +6729,10 @@
+ @#
+ main_loop_j+3:
+ if ins_kp=true then @<Insert |pre_break_penalty| of |cur_chr|@>;
+- @<Look ahead for glue or kerning@>;
++ if main_f<>null_font then
++ begin @<Look ahead for glue or kerning@>;
++ end
++ else inhibit_glue_flag:=false;
+ if ins_kp=false then begin { Kanji -> Kanji }
+ goto main_loop_j+1;
+ end else if ins_kp=true then begin { Kanji -> Ascii }