You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-dev@axis.apache.org by "Senaka Fernando (JIRA)" <ji...@apache.org> on 2007/11/30 14:38:43 UTC

[jira] Commented: (AXIS2C-795) Possible seg fault looking for transport http prefix if specified URL omits :

    [ https://issues.apache.org/jira/browse/AXIS2C-795?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12547133 ] 

Senaka Fernando commented on AXIS2C-795:
----------------------------------------

Hi Bill,

     I agree with you. In addition to the change you've made, you also need to log an error saying that the URL does not contain a transport protocol. Otherwise, nobody would know what happened. (ex:- this error could occur if someone omits the 'HTTP:' portion of a URL)

Regards,
Senaka

P.S. refer diff.txt for proposed patch.

> Possible seg fault looking for transport http prefix if specified URL omits : 
> ------------------------------------------------------------------------------
>
>                 Key: AXIS2C-795
>                 URL: https://issues.apache.org/jira/browse/AXIS2C-795
>             Project: Axis2-C
>          Issue Type: Bug
>          Components: core/clientapi
>    Affects Versions: 1.1.0
>         Environment: Windows XP, Visual Studio 2005
>            Reporter: Bill Mitchell
>            Priority: Minor
>
> In op_client.c, the function axis2_get_transport_from_url() is used to analyze the prefix to the URL.  If the URL is malformed and does not contain a colon, the scan runs off the end of the url string.
> The loop that reads:
>     start = url;
>     end = url;
>     while (end && (*end) != ':')
>         end++;
> should read:
>     start = url;
>     end = url;
>     while ((*end) && (*end) != ':')
>         end++;
> I'll admit to coming across this by inspection while tracking another problem.  I have not actually forced the seg fault, as the loop will usually find a colon somewhere in memory and return a very large transport string.  

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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