axis-c-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Samisa Abeysinghe (JIRA)" <j...@apache.org>
Subject [jira] Assigned: (AXIS2C-318) xmlBufferPtr is used incorrectly in libxml2_writer_wrapper
Date Mon, 02 Oct 2006 16:04:20 GMT
     [ http://issues.apache.org/jira/browse/AXIS2C-318?page=all ]

Samisa Abeysinghe reassigned AXIS2C-318:
----------------------------------------

    Assignee: Samisa Abeysinghe

> xmlBufferPtr is used incorrectly in libxml2_writer_wrapper
> ----------------------------------------------------------
>
>                 Key: AXIS2C-318
>                 URL: http://issues.apache.org/jira/browse/AXIS2C-318
>             Project: Axis2-C
>          Issue Type: Bug
>          Components: xml/parser
>    Affects Versions: Current (Nightly)
>            Reporter: Samisa Abeysinghe
>         Assigned To: 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));
>             sprintf(output,
>                     ((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: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-c-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-c-dev-help@ws.apache.org


Mime
View raw message