axis-c-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Malinda Kaushalye Kapuruge (JIRA)" <j...@apache.org>
Subject [jira] Commented: (AXIS2C-866) REOPEN - /util/src/base64.c incorrect calculation of length in 'axutil_base64_decode_len'
Date Wed, 23 Jan 2008 07:30:34 GMT

    [ https://issues.apache.org/jira/browse/AXIS2C-866?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12561603#action_12561603
] 

Malinda Kaushalye Kapuruge commented on AXIS2C-866:
---------------------------------------------------

I prefer the Option #4.


> 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
>            Priority: Critical
>
> 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


Mime
View raw message