Details
-
Type:
Bug
-
Status:
Open
-
Priority:
Minor
-
Resolution: Unresolved
-
Labels:None
-
Number of attachments :
Description
My XML files can contain base64 encoded binary data, stored as text node in tags, which can be fairly large ( > 20 MByte... hum... sorry !). Such XML files cannot be read by StAX due to variable overflow in MXParser.java:
in fillBuf function, bufSoftLimit overflows when buf.length > 21MByte in:
bufSoftLimit = ( bufLoadFactor * buf.length ) /100;
Should rather be:
bufSoftLimit = (int) ((((double) bufLoadFactor) / 100) * buf.length);
Or, better, bufLoadFactor should be declared as:
protected double bufLoadFactor = 0.95; // instead of protected int bufLoadFactor = 95;
and the above formula should be:
bufSoftLimit = bufLoadFactor * buf.length;
However, since bufLoadFactor is declared as protected, I am not sure that changing the type won't break compatibility...
Regards,
Stéphane El Guedj