axis-c-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Chinthana Danapala (JIRA)" <>
Subject [jira] Updated: (AXISCPP-826) Apache2Transport::getBytes() may lead to access violation
Date Thu, 27 Oct 2005 04:10:58 GMT
     [ ]

Chinthana Danapala updated AXISCPP-826:

    Attachment: Apache2Transport.cpp

I have modify the file and tested in windows. Its working fine and I have attached the file.
Could anyone test with other platform? Then I'll be able to commit the changes. 

> Apache2Transport::getBytes() may lead to access violation
> ---------------------------------------------------------
>          Key: AXISCPP-826
>          URL:
>      Project: Axis-C++
>         Type: Bug
>   Components: Transport (Server), Transport (axis2), Server - Apache module
>     Versions: unspecified
>     Reporter: Henrik Nordberg
>     Assignee: Chinthana Danapala
>  Attachments: Apache2Transport.cpp
> You can't use a function like strstr() on a non-null terminated string, such as the buffer
filled by ap_get_client_block(). This is done in Apache2Transport::getBytes() in Apache2Transport.cpp,
where the following code is copied from:
>     len_read = ap_get_client_block((request_rec*) m_pContext, pBuffer, *piSize);
>   if (strstr(pBuffer, "Content-Id")) {
>   pAttachmentHelper = new AttachmentHelper();
> ...
> pBuffer must be terminated with a '\0' before you can use it in a call to strstr(). So
maybe that if(strstr... block should be moved down to just before return TRANSPORT_FINISHED;
? I am not sure of the intention of the code, so the author should make the decision.

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:

View raw message