[Pkg-javascript-commits] [node-browserify-aes] 36/43: authCipher: fix Buffer.from using from rather than alloc

Bastien Roucariès rouca at moszumanska.debian.org
Thu Sep 7 14:42:00 UTC 2017


This is an automated email from the git hooks/post-receive script.

rouca pushed a commit to branch master
in repository node-browserify-aes.

commit 0e492b62c901ea3ddb48026a6a9bc4f1e54dca5c
Author: Daniel Cousens <github at dcousens.com>
Date:   Fri Jun 16 13:53:49 2017 +1000

    authCipher: fix Buffer.from using from rather than alloc
---
 authCipher.js | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/authCipher.js b/authCipher.js
index 6757212..2a7affc 100644
--- a/authCipher.js
+++ b/authCipher.js
@@ -44,8 +44,7 @@ StreamCipher.prototype._update = function (chunk) {
   if (!this._called && this._alen) {
     var rump = 16 - (this._alen % 16)
     if (rump < 16) {
-      rump = Buffer.from(rump)
-      rump.fill(0)
+      rump = Buffer.alloc(rump, 0)
       this._ghash.update(rump)
     }
   }

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/node-browserify-aes.git



More information about the Pkg-javascript-commits mailing list