From 00a0d03015db804c16a0933f7660e781315bfc86 Mon Sep 17 00:00:00 2001 From: Alberto Massari <amassari@apache.org> Date: Fri, 21 Nov 2003 15:44:12 +0000 Subject: [PATCH] insertElementAt was not checking if there was room for the new element (bug#24714) git-svn-id: https://svn.apache.org/repos/asf/xerces/c/trunk@175422 13f79535-47bb-0310-9956-ffa450edef68 --- src/xercesc/util/ValueVectorOf.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/xercesc/util/ValueVectorOf.c b/src/xercesc/util/ValueVectorOf.c index 8c2b83ffd..ade5831b3 100644 --- a/src/xercesc/util/ValueVectorOf.c +++ b/src/xercesc/util/ValueVectorOf.c @@ -56,6 +56,9 @@ /** * $Log$ + * Revision 1.8 2003/11/21 15:44:12 amassari + * insertElementAt was not checking if there was room for the new element (bug#24714) + * * Revision 1.7 2003/05/29 13:26:44 knoaman * Fix memory leak when using deprecated dom. * @@ -221,6 +224,7 @@ insertElementAt(const TElem& toInsert, const unsigned int insertAt) ThrowXML(ArrayIndexOutOfBoundsException, XMLExcepts::Vector_BadIndex); // Make room for the newbie + ensureExtraCapacity(1); for (unsigned int index = fCurCount; index > insertAt; index--) fElemList[index] = fElemList[index-1]; -- GitLab