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 "Dinesh Premalal (JIRA)" <ji...@apache.org> on 2007/11/26 06:43:44 UTC
[jira] Resolved: (AXIS2C-731) /util/src/base64.c incorrect
calculation of length in 'axutil_base64_decode_len'
[ https://issues.apache.org/jira/browse/AXIS2C-731?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Dinesh Premalal resolved AXIS2C-731.
------------------------------------
Resolution: Fixed
thanks everyone who worked on this issue !
> /util/src/base64.c incorrect calculation of length in 'axutil_base64_decode_len'
> --------------------------------------------------------------------------------
>
> Key: AXIS2C-731
> URL: https://issues.apache.org/jira/browse/AXIS2C-731
> Project: Axis2-C
> Issue Type: Bug
> Components: util
> Reporter: Mark Nüßler
> Assignee: Dinesh Premalal
> Fix For: 1.2.0
>
>
> Royston Day told me in the mailinglist about this issue, some time ago, i've checked this - for me Royston is right.
> current implementation :
> 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 + 3) / 4) * 3;
> return nbytesdecoded + 1;
> }
> Royston implementation :
> 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;
> }
--
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