Skip to content
This repository was archived by the owner on Aug 31, 2021. It is now read-only.

Commit 033a2ce

Browse files
author
livecodeali
committed
[[ Bug 15848 ]] Fix overrelease bug in revXML
1 parent ba4c3d2 commit 033a2ce

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

docs/notes/bugfix-15848.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# Crash on repeating revXMLMatchingNode twice on the same tree

revxml/src/xmlelement.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -831,7 +831,8 @@ char *CXMLElement::GetAttributeValue(char *attname, Bool isbuffered)
831831
do
832832
{
833833
if (!attname || util_strnicmp(tattribute.GetName(), attname, strlen(attname)) == 0)
834-
return tattribute.GetContent();
834+
// AL-2015-09-02: [[ Bug 15848 ]] if isbuffered is true, returned string is freed by the caller
835+
return strdup(tattribute.GetContent());
835836
} while (tattribute.GoNext());
836837
}
837838
}

0 commit comments

Comments
 (0)