[
https://issues.apache.org/jira/browse/IMPALA-12986?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Daniel Becker resolved IMPALA-12986.
------------------------------------
Resolution: Fixed
> Base64Encode fails if the 'out_len' output parameter is passed with certain
> values
> ----------------------------------------------------------------------------------
>
> Key: IMPALA-12986
> URL: https://issues.apache.org/jira/browse/IMPALA-12986
> Project: IMPALA
> Issue Type: Bug
> Components: Backend
> Reporter: Daniel Becker
> Assignee: Daniel Becker
> Priority: Major
>
> The Base64Encode function in coding-util.h with signature
> {code:java}
> bool Base64Encode(const char* in, int64_t in_len, int64_t out_max, char* out,
> int64_t* out_len);{code}
> fails if '*out_len', when passed to the function, contains a negative value
> or a value that does not fit in a 32 bit integer.
> Internally we use the
>
> {code:java}
> int sasl_encode64(const char *in, unsigned inlen, char *out, unsigned outmax,
> unsigned *outlen);{code}
>
> function and explicitly cast 'out_len' to 'unsigned*'.
> The success of this function shouldn't depend on the value of '*out_len'
> because it is an output parameter, so we should set '*out_len' to zero before
> passing it to {{{}sasl_encode64(){}}}.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]