Title: FdfReader bug

It 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 0

since 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.

---------------------------------------------------------

Reply via email to