ogajduse / rpms / texlive

Forked from rpms/texlive 6 years ago
Clone
6d2b15b
diff -up texlive-2007/texk/web2c/bibtex.ch.poolfix texlive-2007/texk/web2c/bibtex.ch
6d2b15b
--- texlive-2007/texk/web2c/bibtex.ch.poolfix	2006-12-27 00:37:34.000000000 +0100
35b0b02
+++ texlive-2007/texk/web2c/bibtex.ch	2009-10-16 06:55:52.000000000 +0200
35b0b02
@@ -1134,6 +1134,15 @@ while ((ex_buf_xptr < ex_buf_ptr) and
35b0b02
 @y
35b0b02
 @z
6d2b15b
 
35b0b02
+% Forgot to check for pool overflow here.  Triggered by test case linked
35b0b02
+% from http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=520920.
35b0b02
+@x
35b0b02
+while (sp_ptr < sp_end) do                      {shift the substring}
35b0b02
+@y
35b0b02
+str_room(sp_end - sp_ptr);
35b0b02
+while (sp_ptr < sp_end) do                      {shift the substring}
35b0b02
+@z
35b0b02
+
35b0b02
 % [459] Eliminate unreferenced statement label, because `undefined' is
35b0b02
 % now a constant expression that is not evaluated at the Web level. If
35b0b02
 % this label were ever required, it could be replaced by the constant