You are viewing a plain text version of this content. The canonical link for it is here.
Posted to axis-cvs@ws.apache.org by sa...@apache.org on 2006/10/04 20:38:54 UTC
svn commit: r452970 -
/webservices/axis2/trunk/c/axiom/src/parser/libxml2/libxml2_writer_wrapper.c
Author: samisa
Date: Wed Oct 4 11:38:54 2006
New Revision: 452970
URL: http://svn.apache.org/viewvc?view=rev&rev=452970
Log:
Fixed the use of xmlBufferPtr. Used size of xmlBufferPtr to malloc buffer.
Modified:
webservices/axis2/trunk/c/axiom/src/parser/libxml2/libxml2_writer_wrapper.c
Modified: webservices/axis2/trunk/c/axiom/src/parser/libxml2/libxml2_writer_wrapper.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/axiom/src/parser/libxml2/libxml2_writer_wrapper.c?view=diff&rev=452970&r1=452969&r2=452970
==============================================================================
--- webservices/axis2/trunk/c/axiom/src/parser/libxml2/libxml2_writer_wrapper.c (original)
+++ webservices/axis2/trunk/c/axiom/src/parser/libxml2/libxml2_writer_wrapper.c Wed Oct 4 11:38:54 2006
@@ -1500,9 +1500,10 @@
{
output = AXIS2_MALLOC(env->allocator,
sizeof(axis2_char_t) * (
- strlen((const axis2_char_t*)(writer_impl->buffer->content)) + 1));
- sprintf(output,
- ((const axis2_char_t*)(writer_impl->buffer->content)));
+ writer_impl->buffer->size + 1));
+ memcpy(output, writer_impl->buffer->content, writer_impl->buffer->size);
+ output[writer_impl->buffer->size] = '\0';
+
}
return (void*)output;
}
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-cvs-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-cvs-help@ws.apache.org