axis-c-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Senaka Fernando (JIRA)" <>
Subject [jira] Resolved: (AXIS2C-1000) Creating a new base64 binary does not initialize length to 0
Date Wed, 20 Feb 2008 19:23:43 GMT


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:
>             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
> 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:
For additional commands, e-mail:

View raw message