You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by Evgeny Kotkov via commits <co...@subversion.apache.org> on 2026/01/12 13:24:35 UTC
Re: svn commit: r1931019 - in subversion/trunk: . subversion/include subversion/libsvn_subr
Timofei Zhakov <ri...@apache.org> writes:
+static svn_error_t *
+bcrypt_ctx_update(bcrypt_ctx_t *ctx,
+ const void *data,
+ apr_size_t len)
+{
+ SVN_ERR_ASSERT(len <= ULONG_MAX);
+
+ SVN_ERR(handle_error(BCryptHashData(ctx->handle,
+ (PUCHAR) data,
+ (ULONG) len,
+ /* dwFlags */ 0)));
+
+ return SVN_NO_ERROR;
+}
Perhaps, we could add a loop here to have correct behavior in a potentially
possible case when `len` exceeds ULONG_MAX?
Thanks,
Evgeny Kotkov
Re: svn commit: r1931019 - in subversion/trunk: . subversion/include subversion/libsvn_subr
Posted by Timofei Zhakov <ti...@chemodax.net>.
On Mon, Jan 12, 2026 at 2:25 PM Evgeny Kotkov via dev
<de...@subversion.apache.org> wrote:
>
> Timofei Zhakov <ri...@apache.org> writes:
>
> +static svn_error_t *
> +bcrypt_ctx_update(bcrypt_ctx_t *ctx,
> + const void *data,
> + apr_size_t len)
> +{
> + SVN_ERR_ASSERT(len <= ULONG_MAX);
> +
> + SVN_ERR(handle_error(BCryptHashData(ctx->handle,
> + (PUCHAR) data,
> + (ULONG) len,
> + /* dwFlags */ 0)));
> +
> + return SVN_NO_ERROR;
> +}
>
> Perhaps, we could add a loop here to have correct behavior in a potentially
> possible case when `len` exceeds ULONG_MAX?
Sorry, I lost this thread...
+1
There is a patch for the APR backend at [1]. Thanks!
[1] https://lists.apache.org/thread/6g6yl073p8gq3k8hyjyxy82qlsjosok7
--
Timofei Zhakov
Re: svn commit: r1931019 - in subversion/trunk: . subversion/include subversion/libsvn_subr
Posted by Branko Čibej <br...@apache.org>.
On 12. 1. 26 14:24, Evgeny Kotkov via dev wrote:
> Timofei Zhakov<ri...@apache.org> writes:
>
> +static svn_error_t *
> +bcrypt_ctx_update(bcrypt_ctx_t *ctx,
> + const void *data,
> + apr_size_t len)
> +{
> + SVN_ERR_ASSERT(len <= ULONG_MAX);
> +
> + SVN_ERR(handle_error(BCryptHashData(ctx->handle,
> + (PUCHAR) data,
> + (ULONG) len,
> + /* dwFlags */ 0)));
> +
> + return SVN_NO_ERROR;
> +}
>
> Perhaps, we could add a loop here to have correct behavior in a potentially
> possible case when `len` exceeds ULONG_MAX?
+1