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 2008/02/20 20:23:43 UTC

[jira] Resolved: (AXIS2C-1000) Creating a new base64 binary does not initialize length to 0

     [ https://issues.apache.org/jira/browse/AXIS2C-1000?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Senaka Fernando resolved AXIS2C-1000.
-------------------------------------

       Resolution: Fixed
    Fix Version/s: 1.3.0
         Assignee: Senaka Fernando

Fixed Issue. Thanks Frank, for pointing this out.

> Creating a new base64 binary does not initialize length to 0
> ------------------------------------------------------------
>
>                 Key: AXIS2C-1000
>                 URL: https://issues.apache.org/jira/browse/AXIS2C-1000
>             Project: Axis2-C
>          Issue Type: Bug
>          Components: util
>            Reporter: Frank Huebbers
>            Assignee: Senaka Fernando
>             Fix For: 1.3.0
>
>
> I have a scenario where I need to create an empty binary array. I do this by using the following API:
> axutil_base64_binary_t* binary  = axutil_base64_binary_create(env);
> The problem that I have is that when I pass this variable to one of my types and then serialize the call to send it out, I get an "Invalid allocation .." exception saying that the allocation size was requested which exceeds the limit of 2GB. I was able to track down the issue to the empty binary. The problem, as the title of this bug indicates, is that the length of the binary is not initialized to zero. Therefore, the error occurs in the API : axutil_base64_binary_get_encoded_binary where a malloc is done which is dependent on the size/length of the binary. Since the length variable is an arbitrary value, I can get the problem outlined before.
> I was able to get around the problem by initializing the binary instead as follows (clearly a workaround):
> usigned char t[1];
> axutil_base64_binary_t* binary  = axutil_base64_binary_create_with_plain_binary(env, t, 0);
> Frank

-- 
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