[ pdftex-Bugs-444 ] buffer overflow with \pdfmatch
Bugs item #444, was opened at 2005-10-29 19: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? ----------------------------------------------------------------------
Comment By: Hartmut Henkel (hhenkel) Date: 2005-10-29 21:08
Message: Logged In: YES user_id=929 see patch to utils.c. This makes makecstring() memory grow on demand. Also increase MAX_CSTRING_LEN in ptexmac.h to e. g. 10000000. ---------------------------------------------------------------------- You can respond by visiting: http://sarovar.org/tracker/?func=detail&atid=493&aid=444&group_id=106
participants (1)
-
noreply@sarovar.org