axis-c-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Samisa Abeysinghe (JIRA)" <>
Subject [jira] Created: (AXIS2C-318) xmlBufferPtr is used incorrectly in libxml2_writer_wrapper
Date Mon, 02 Oct 2006 15:10:21 GMT
xmlBufferPtr is used incorrectly in libxml2_writer_wrapper

                 Key: AXIS2C-318
             Project: Axis2-C
          Issue Type: Bug
          Components: xml/parser
    Affects Versions: Current (Nightly)
            Reporter: Samisa Abeysinghe

in axis2_libxml2_writer_wrapper_get_xml function we have:
output = AXIS2_MALLOC(env->allocator,
                    sizeof(axis2_char_t) * (
                        strlen((const axis2_char_t*)(writer_impl->buffer->content))
+ 1));
                    ((const axis2_char_t*)(writer_impl->buffer->content)));

Where buffer is defined as:

xmlBufferPtr buffer;

Looking at the definition of xmlBuffer, it looks to me that there is a size field that we
should look into.  Hence, just taking strlen of buffer content is error prone. Also, content
is of type 'unsigned char'. Hence casting that to 'axis2_char_t' may also lead to errors.

This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators:
For more information on JIRA, see:


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message