Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Browse files

fix state update problem for digests

We need to update the amount of data in the buffer even after we've
consumed all the data.  Otherwise, we can run into a situation where we
had N bytes buffered and update with (blocksize - N) + blocksize bytes;
we consume all the buffered data and the provided data and there's
nothing left in the buffer.  Fixes problems introduced in
  • Loading branch information...
commit b67b0218d9f1169e8bd88b4a48da8346fd77f9f5 1 parent 8fd2eaf
@froydnj authored
Showing with 2 additions and 2 deletions.
  1. +2 −2 src/digests/digest.lisp
4 src/digests/digest.lisp
@@ -239,8 +239,8 @@
finally (return
(let ((amount (- end start)))
(unless (zerop amount)
- (copy-to-buffer seq start amount buffer 0)
- (setf (mdx-buffer-index state) amount))
+ (copy-to-buffer seq start amount buffer 0))
+ (setf (mdx-buffer-index state) amount)
(incf (mdx-amount state) length)
(declaim (notinline mdx-updater))
Please sign in to comment.
Something went wrong with that request. Please try again.