[Pkg-javascript-commits] [node-sha.js] 125/237: Fix streaming updates (limit writing so it doesn't go over block size)
Bastien Roucariès
rouca at moszumanska.debian.org
Fri May 5 09:03:46 UTC 2017
This is an automated email from the git hooks/post-receive script.
rouca pushed a commit to branch master
in repository node-sha.js.
commit 50b8ddb4a5ec8fdaef7c51a01540b237e14a9b5e
Author: David Halls <dahalls at gmail.com>
Date: Wed Jul 23 08:05:55 2014 +0100
Fix streaming updates (limit writing so it doesn't go over block size)
---
hash.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/hash.js b/hash.js
index 29dc76d..f50a03a 100644
--- a/hash.js
+++ b/hash.js
@@ -50,7 +50,7 @@ module.exports = function (Buffer) {
var f = 0
var buffer = this._block
while(s < l) {
- var t = Math.min(length, f + bl)
+ var t = Math.min(length, f + bl - s%bl)
write(buffer, data, enc, s%bl, f, t)
var ch = (t - f);
s += ch; f += ch
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/node-sha.js.git
More information about the Pkg-javascript-commits
mailing list