[NTG-pdftex] [ pdftex-Bugs-444 ] buffer overflow with \pdfmatch
noreply at sarovar.org
noreply at sarovar.org
Sat Oct 29 19:24:59 CEST 2005
Bugs item #444, was opened at 2005-10-29 17:24
You can respond by visiting:
http://sarovar.org/tracker/?func=detail&atid=493&aid=444&group_id=106
Category: None
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Robert (schlcht)
Assigned to: Nobody (None)
Summary: buffer overflow with \pdfmatch
Initial Comment:
% The new \pdfmatch primitive will run into a buffer
overflow with strings
% longer than 1023 characters:
%
% (I am using 1.30.3 with Thanh's patches from
pdftex.sarovar.org/src,
% compiled under cygwin.)
\def\x{1,2,3,4,5,6,7,8,9,0,}
\def\testlist{%
,\x\x\x\x\x \x\x\x\x\x \x\x\x\x\x \x\x\x\x\x
\x\x\x\x\x \x\x\x\x\x \x\x\x\x\x \x\x\x\x\x
\x\x\x\x\x \x\x\x\x\x \x00,}% 1024
\ifcase\pdfmatch{,1,}{\testlist}\relax \fi
% Also, if the pattern is too long:
%\ifcase\pdfmatch{\testlist}{1}\relax \fi
\bye,
Robert.
PS: Is there a simple way to escape all regex special
characters in a string?
----------------------------------------------------------------------
You can respond by visiting:
http://sarovar.org/tracker/?func=detail&atid=493&aid=444&group_id=106
More information about the ntg-pdftex
mailing list