From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Malloy, James
Sent: Tuesday, September 21, 2004 2:08 PM
To: [EMAIL PROTECTED]
Subject: [iText-questions] FdfReader bugIt appears that if there are uneven parenthesis in the fdf data then Itext crashes while parsing the fdf file.
example:
/V
((Bonnie Broker)
>>I understand the cause of the problem but have no idea how to fix it.
The cause is currently in PRTokenizer whenever char '(' is encountered a nested int is incremented. Whenever ')' is encountered it is decreased. The first '(' is not included in the counts. When the nested int hits -1 it the current loop is escaped. What occures when there is uneven nested parenthesis is -1 is never reached.
In the example above:
First '(' ignored
Second '(' nested++ value 1
does test of Bonnie Broker
Closing ')' nested -- value 0since the value is zero after the last parenthesis it never escapes form the read loop.
I've looked into fixing the problem myself but with no sucess. Has anyone figured out a fix to this problem?
Jim Malloy
Enterprise Application Services---------------------------------------------------------
This e-mail transmission may contain information that is proprietary, privileged and/or confidential and is intended exclusively for the person(s) to whom it is addressed. Any use, copying, retention or disclosure by any person other than the intended recipient or the intended recipient's designees is strictly prohibited. If you are not the intended recipient or their designee, please notify the sender immediately by return e-mail and delete all copies.
---------------------------------------------------------
Title: FdfReader bug
The only fix that needs to be done is in the fdf file. Parenthesis
must be escaped or balanced.
Best Regards,
Paulo Soares
