Re: svn commit: r1931019 - in subversion/trunk: . subversion/include subversion/libsvn_subr

"Evgeny Kotkov via commits" <[email protected]>
Newsgroups gmane.comp.apache.webservices.tuscany.devel,gmane.comp.version-control.subversion.svn
Message-ID <CAP_GPNieks7N8UmfNy0GDYrm5SJaFzZU4GaSWc4wZskxjQef8Q__31187.6665380382$1768224312$gmane$org@mail.gmail.com>
Timofei Zhakov <[email protected]> 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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.