Piotr Caban piotr.caban@gmail.com writes:
+static HRESULT namespacePush(saxlocator *locator, int ns) +{
- if(locator->nsStackLast+1>locator->nsStackSize)
- {
locator->nsStackSize += STACKALLOCATIONSIZE;
locator->nsStack = HeapReAlloc(GetProcessHeap(), 0,
locator->nsStack, locator->nsStackSize);
if(!locator->nsStack) return E_FAIL;
You should preserve the existing stack on failure. Also the growth should be by a multiple of the current size instead of a constant.