It makes perfect sense to me: if buffer is NULL then remove the node. Since
all the code below is ready for doing this, I feel that this assert is not necessary :)
But you are right and your patch was perfectly correct :)
BTW, if you are going to get updated code from CVS, then it is better to get it
from "XMLSEC_1_2_X_BRANCH" branch instead of tip (trunk). I am doing some
hacking on the trunk these days and it might not be stable.
Aleksey
Tomas Sieger wrote:
...but if you used the xmlSecReplaceNodeBuffer() function from more contexts than just xmlSecEncCtxDecrypt(), you would have wanted to leave the assert be on guard...
Tomas
Aleksey Sanin wrote:
You are absolutely right, it is a bug :( But the patch is actually can be much more simple:
just remove one un-necessary assert :)
Thanks for reporting the bug! Aleksey
Index: src/xmltree.c
===================================================================
RCS file: /cvs/gnome/xmlsec/src/xmltree.c,v
retrieving revision 1.33
diff -u -r1.33 xmltree.c
--- src/xmltree.c 8 Feb 2004 06:43:38 -0000 1.33
+++ src/xmltree.c 9 Feb 2004 16:38:22 -0000
@@ -515,7 +515,6 @@
xmlNodePtr ptr1, ptr2;
xmlSecAssert2(node != NULL, -1);
- xmlSecAssert2(buffer != NULL, -1);
doc = xmlSecParseMemoryExt((xmlSecByte*)dummyPrefix, strlen(dummyPrefix),
buffer, size,
_______________________________________________ xmlsec mailing list [EMAIL PROTECTED] http://www.aleksey.com/mailman/listinfo/xmlsec
_______________________________________________ xmlsec mailing list [EMAIL PROTECTED] http://www.aleksey.com/mailman/listinfo/xmlsec
_______________________________________________ xmlsec mailing list [EMAIL PROTECTED] http://www.aleksey.com/mailman/listinfo/xmlsec
