mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-15 21:15:23 +02:00
[221601][dstore] xmlparser needs to be able to handle very large attributes
This commit is contained in:
parent
7f08921789
commit
11d34bf0e6
1 changed files with 10 additions and 3 deletions
|
@ -13,6 +13,7 @@
|
||||||
*
|
*
|
||||||
* Contributors:
|
* Contributors:
|
||||||
* David McKnight (IBM) [220123][dstore] Configurable timeout on irresponsiveness
|
* David McKnight (IBM) [220123][dstore] Configurable timeout on irresponsiveness
|
||||||
|
* David McKnight (IBM) [221601][dstore] xmlparser needs to be able to handle very large attributes
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
|
|
||||||
package org.eclipse.dstore.internal.core.util;
|
package org.eclipse.dstore.internal.core.util;
|
||||||
|
@ -398,9 +399,15 @@ public class XMLparser
|
||||||
|
|
||||||
if (offset >= _maxBuffer)
|
if (offset >= _maxBuffer)
|
||||||
{
|
{
|
||||||
done = true;
|
int newMaxBuffer = 2 * _maxBuffer;
|
||||||
|
byte[] newBuffer = new byte[newMaxBuffer];
|
||||||
|
for (int i = 0; i < _maxBuffer; i++){
|
||||||
|
newBuffer[i] = _byteBuffer[i];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
_maxBuffer = newMaxBuffer;
|
||||||
|
_byteBuffer = newBuffer;
|
||||||
|
}
|
||||||
_byteBuffer[offset] = aByte;
|
_byteBuffer[offset] = aByte;
|
||||||
offset++;
|
offset++;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue