mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-04 15:45:25 +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:
|
||||
* 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;
|
||||
|
@ -395,12 +396,18 @@ public class XMLparser
|
|||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
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;
|
||||
offset++;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue