gtquang / serialized-php-parser

Automatically exported from code.google.com/p/serialized-php-parser
0 stars 0 forks source link

Problem with integer and defect serialized strings. #4

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
First Problem:
1. Using php 64bit to generate the serialized String.
2. Any Integer have the range of Java Long
Secound Problem:
1. If the serialized String is corrupted (undefined end).
2. The parser throws a java.lang.NumberFormatException or 
java.lang.StringIndexOutOfBoundsException

I made a patch with an extra exception SerializedPhpParserException. This 
exception will be thrown.
Also for the first case i change the integer scanner to return an long if the 
integer is out of integer range.

I hope the Patch can help you to improve the very nice parser :-)

Bye Michele

Original issue reported on code.google.com by ironping...@gmail.com on 23 Nov 2011 at 5:10

Attachments: