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 "Frank Huebbers (JIRA)" <ji...@apache.org> on 2008/02/19 21:58:43 UTC

[jira] Closed: (AXIS2C-866) REOPEN - /util/src/base64.c incorrect calculation of length in 'axutil_base64_decode_len'

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

Frank Huebbers closed AXIS2C-866.
---------------------------------


Also verified that this works on my end with a snapshot build from 7/2/2008.

> REOPEN - /util/src/base64.c incorrect calculation of length in 'axutil_base64_decode_len'
> -----------------------------------------------------------------------------------------
>
>                 Key: AXIS2C-866
>                 URL: https://issues.apache.org/jira/browse/AXIS2C-866
>             Project: Axis2-C
>          Issue Type: Bug
>          Components: util
>    Affects Versions: 1.2.0
>            Reporter: Frank Huebbers
>            Assignee: Dinesh Premalal
>            Priority: Critical
>             Fix For: 1.3.0
>
>
> Hi,
> First off, I am opening a new issue here because I don't seem to be able to reopen case AXIS2C-731 which does not yet seem to be fixed either for the release candidate 1.2.0 (Take 4) nor on head.
> Specifically, it appears as if the proposed bug fix in AXIS2C-731 did not make it 1-to-1 into CVS. To reiterate, the proposed bug fix was:
> AXIS2_EXTERN int AXIS2_CALL axutil_base64_decode_len(const char *bufcoded)
> {
>     int nbytesdecoded;
>     register const unsigned char *bufin;
>     register int nprbytes;
>     bufin = (const unsigned char *) bufcoded;
>     while (pr2six[*(bufin++)] <= 63);
>     nprbytes = (bufin - (const unsigned char *) bufcoded) - 1;
>     nbytesdecoded = ((nprbytes >> 2) * 3);
>     if (nprbytes & 0x03) nbytesdecoded += (nprbytes & 0x03) - 1;
>     return nbytesdecoded;
> }
> What actually made it into 1.2.0 and head is the following:
> AXIS2_EXTERN int AXIS2_CALL axutil_base64_decode_len(const char *bufcoded)
> {
>     int nbytesdecoded;
>     register const unsigned char *bufin;
>     register int nprbytes;
>     bufin = (const unsigned char *) bufcoded;
>     while (pr2six[*(bufin++)] <= 63);
>     nprbytes = (bufin - (const unsigned char *) bufcoded) - 1;
>     nbytesdecoded = ((nprbytes >> 2) * 3);
>     if (nprbytes & 0x03) nbytesdecoded += (nprbytes & 0x03) - 1;
>     return nbytesdecoded + 1;
> }
> => Note the "+1" on the return type. 
> 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