Sat Dec 15 15:29:28 2012 UTC ()
Fix double free in patch for libxml 2.9.0  support


(manu)
diff -r1.14 -r1.15 pkgsrc/security/lasso/Makefile
diff -r1.13 -r1.14 pkgsrc/security/lasso/distinfo
diff -r1.4 -r1.5 pkgsrc/security/lasso/patches/patch-lasso-xml-tools.c

cvs diff -r1.14 -r1.15 pkgsrc/security/lasso/Makefile (expand / switch to unified diff)

--- pkgsrc/security/lasso/Makefile 2012/11/07 15:31:23 1.14
+++ pkgsrc/security/lasso/Makefile 2012/12/15 15:29:28 1.15
@@ -1,16 +1,16 @@ @@ -1,16 +1,16 @@
1# $NetBSD: Makefile,v 1.14 2012/11/07 15:31:23 joerg Exp $ 1# $NetBSD: Makefile,v 1.15 2012/12/15 15:29:28 manu Exp $
2# 2#
3 3
4PKGREVISION= 8 4PKGREVISION= 9
5 5
6CONFIGURE_ARGS+= --disable-python 6CONFIGURE_ARGS+= --disable-python
7CONFIGURE_ARGS+= --disable-php5 7CONFIGURE_ARGS+= --disable-php5
8CONFIGURE_ARGS+= --disable-perl 8CONFIGURE_ARGS+= --disable-perl
9 9
10PKG_DESTDIR_SUPPORT= destdir 10PKG_DESTDIR_SUPPORT= destdir
11 11
12PYTHON_FOR_BUILD_ONLY= yes 12PYTHON_FOR_BUILD_ONLY= yes
13 13
14EXTRACT_USING= bsdtar 14EXTRACT_USING= bsdtar
15 15
16.include "../../security/lasso/Makefile.common" 16.include "../../security/lasso/Makefile.common"

cvs diff -r1.13 -r1.14 pkgsrc/security/lasso/distinfo (expand / switch to unified diff)

--- pkgsrc/security/lasso/distinfo 2012/11/07 15:31:23 1.13
+++ pkgsrc/security/lasso/distinfo 2012/12/15 15:29:28 1.14
@@ -1,16 +1,16 @@ @@ -1,16 +1,16 @@
1$NetBSD: distinfo,v 1.13 2012/11/07 15:31:23 joerg Exp $ 1$NetBSD: distinfo,v 1.14 2012/12/15 15:29:28 manu Exp $
2 2
3SHA1 (lasso-2.3.6.tar.gz) = 92689a873b83e02efb4a6c3a375f040a9e75c95c 3SHA1 (lasso-2.3.6.tar.gz) = 92689a873b83e02efb4a6c3a375f040a9e75c95c
4RMD160 (lasso-2.3.6.tar.gz) = 5e1aaba807d453c1fad28be6a8f06d908159b3fe 4RMD160 (lasso-2.3.6.tar.gz) = 5e1aaba807d453c1fad28be6a8f06d908159b3fe
5Size (lasso-2.3.6.tar.gz) = 3940027 bytes 5Size (lasso-2.3.6.tar.gz) = 3940027 bytes
6SHA1 (patch-bindings-java-wrapper_top.c) = 16f98d5edb21ca97f05a3d108a04da8be2ec2ed4 6SHA1 (patch-bindings-java-wrapper_top.c) = 16f98d5edb21ca97f05a3d108a04da8be2ec2ed4
7SHA1 (patch-bindings-php5-wrapper_source_top.c) = 21c92807633ce96188f6bbdf72129d16f5784f19 7SHA1 (patch-bindings-php5-wrapper_source_top.c) = 21c92807633ce96188f6bbdf72129d16f5784f19
8SHA1 (patch-bindings-python-wrapper_top.c) = db730c2443e1a618f0719cd190a30a2bba241961 8SHA1 (patch-bindings-python-wrapper_top.c) = db730c2443e1a618f0719cd190a30a2bba241961
9SHA1 (patch-docs-reference-lasso-lasso-sections.txt) = 9e6936b0c019b8fb8b9493f914241131b684cbfc 9SHA1 (patch-docs-reference-lasso-lasso-sections.txt) = 9e6936b0c019b8fb8b9493f914241131b684cbfc
10SHA1 (patch-lasso-errors_c) = 5c0fe304cd9cce6d926362c248ffe60c2c7357c5 10SHA1 (patch-lasso-errors_c) = 5c0fe304cd9cce6d926362c248ffe60c2c7357c5
11SHA1 (patch-lasso-errors_c_in) = d4663edb280d38a0cb1a422d9b95b1d344012f63 11SHA1 (patch-lasso-errors_c_in) = d4663edb280d38a0cb1a422d9b95b1d344012f63
12SHA1 (patch-lasso-id-ff-provider.c) = 9312c67a8e81eeea95b888745a2b9f504a36a36f 12SHA1 (patch-lasso-id-ff-provider.c) = 9312c67a8e81eeea95b888745a2b9f504a36a36f
13SHA1 (patch-lasso-xml-tools.c) = b04540e06a2ef359972bdee3d8fdf7d11c355cc2 13SHA1 (patch-lasso-xml-tools.c) = 6ee2268747a4f84a0b9d3a53bfa260ab11ba8dfc
14SHA1 (patch-lasso_id-ff_lecp.c) = 90b0d3b06a6582f779706b671c497ad7a556a116 14SHA1 (patch-lasso_id-ff_lecp.c) = 90b0d3b06a6582f779706b671c497ad7a556a116
15SHA1 (patch-lasso_id-ff_session.c) = 839277d013e219c5ba91bae1ab75cef5d99d9286 15SHA1 (patch-lasso_id-ff_session.c) = 839277d013e219c5ba91bae1ab75cef5d99d9286
16SHA1 (patch-lasso_saml-2.0_ecp.c) = cb946f383b9d3fed4ce794deb96a143077746a2c 16SHA1 (patch-lasso_saml-2.0_ecp.c) = cb946f383b9d3fed4ce794deb96a143077746a2c

cvs diff -r1.4 -r1.5 pkgsrc/security/lasso/patches/Attic/patch-lasso-xml-tools.c (expand / switch to unified diff)

--- pkgsrc/security/lasso/patches/Attic/patch-lasso-xml-tools.c 2012/11/07 15:31:23 1.4
+++ pkgsrc/security/lasso/patches/Attic/patch-lasso-xml-tools.c 2012/12/15 15:29:28 1.5
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1$NetBSD: patch-lasso-xml-tools.c,v 1.4 2012/11/07 15:31:23 joerg Exp $ 1$NetBSD: patch-lasso-xml-tools.c,v 1.5 2012/12/15 15:29:28 manu Exp $
2 2
3Patch from upstream to support libxml >= 2.9.0. From commit message: 3Patch from upstream to support libxml >= 2.9.0. From commit message:
4 4
5Libxml stopped exposing the internal of the xmlOutputBuffer structure; 5Libxml stopped exposing the internal of the xmlOutputBuffer structure;
6it was replace by proper use of the API and of the xmlBuffer structure. 6it was replace by proper use of the API and of the xmlBuffer structure.
7 7
8There could be regression for older version of libxml as some functions 8There could be regression for older version of libxml as some functions
9appeared in recent version of libxml; but the reference API document 9appeared in recent version of libxml; but the reference API document
10does not give any introduction date for functions so it's hard to be 10does not give any introduction date for functions so it's hard to be
11sure. 11sure.
12 12
13Don't use nested functions. 13Don't use nested functions.
14 14
@@ -61,27 +61,27 @@ index c4b3c8a..cda8775 100644 @@ -61,27 +61,27 @@ index c4b3c8a..cda8775 100644
61- xmlNodeDumpOutput(buf, NULL, xmlnode, 0, 0, "utf-8"); 61- xmlNodeDumpOutput(buf, NULL, xmlnode, 0, 0, "utf-8");
62- xmlOutputBufferFlush(buf); 62- xmlOutputBufferFlush(buf);
63- buffer = buf->conv ? buf->conv->content : buf->buffer->content; 63- buffer = buf->conv ? buf->conv->content : buf->buffer->content;
64- 64-
65- xmlFreeNode(xmlnode); 65- xmlFreeNode(xmlnode);
66- xmlnode = NULL; 66- xmlnode = NULL;
67- 67-
68- in_len = strlen((char*)buffer); 68- in_len = strlen((char*)buffer);
69+ buffer = xmlBufferCreate(); 69+ buffer = xmlBufferCreate();
70+ output_buffer = xmlOutputBufferCreateBuffer(buffer, NULL); 70+ output_buffer = xmlOutputBufferCreateBuffer(buffer, NULL);
71+ xmlNodeDumpOutput(output_buffer, NULL, xmlnode, 0, 0, NULL); 71+ xmlNodeDumpOutput(output_buffer, NULL, xmlnode, 0, 0, NULL);
72+ xmlOutputBufferClose(output_buffer); 72+ xmlOutputBufferClose(output_buffer);
73+ xmlBufferAdd(buffer, BAD_CAST "", 1); 73+ xmlBufferAdd(buffer, BAD_CAST "", 1);
74+ lasso_release_xml_node(xmlnode); 74+
75+ in_len = strlen((char*)xmlBufferContent(buffer)); 75+ in_len = strlen((char*)xmlBufferContent(buffer));
76 ret = g_malloc(in_len * 2); 76 ret = g_malloc(in_len * 2);
77 /* deflating should never increase the required size but we are 77 /* deflating should never increase the required size but we are
78 * more conservative than that. Twice the size should be 78 * more conservative than that. Twice the size should be
79 * enough. */ 79 * enough. */
80  80
81- stream.next_in = buffer; 81- stream.next_in = buffer;
82+ stream.next_in = (xmlChar*)xmlBufferContent(buffer); 82+ stream.next_in = (xmlChar*)xmlBufferContent(buffer);
83 stream.avail_in = in_len; 83 stream.avail_in = in_len;
84 stream.next_out = ret; 84 stream.next_out = ret;
85 stream.avail_out = in_len * 2; 85 stream.avail_out = in_len * 2;
86@@ -1097,6 +1091,7 @@ lasso_node_build_deflated_query(LassoNod 86@@ -1097,6 +1091,7 @@ lasso_node_build_deflated_query(LassoNod
87 rc = deflateEnd(&stream); 87 rc = deflateEnd(&stream);