]> Cypherpunks repositories - gostls13.git/commitdiff
crypto/cipher: fix duplicated arguments to bytes.Equal in test
authorIskander Sharipov <quasilyte@gmail.com>
Sat, 2 Mar 2019 06:51:44 +0000 (09:51 +0300)
committerFilippo Valsorda <filippo@golang.org>
Fri, 8 Mar 2019 22:18:36 +0000 (22:18 +0000)
Args were duplicated by a mistake. Found using static analysis tools.

Change-Id: I2f61e09844bc409b1f687d654767332d93dd39a2
Reviewed-on: https://go-review.googlesource.com/c/go/+/164937
Reviewed-by: Emmanuel Odeke <emm.odeke@gmail.com>
src/crypto/cipher/cfb_test.go

index ecb716df015160e4376326b8ecf933a9fa40f8cc..72f62e69d3d39cb9a6c40df6f110ff8a27774f07 100644 (file)
@@ -81,7 +81,7 @@ func TestCFBVectors(t *testing.T) {
                plaintextCopy := make([]byte, len(ciphertext))
                cfbdec.XORKeyStream(plaintextCopy, ciphertext)
 
-               if !bytes.Equal(plaintextCopy, plaintextCopy) {
+               if !bytes.Equal(plaintextCopy, plaintext) {
                        t.Errorf("#%d: wrong plaintext: got %x, expected %x", i, plaintextCopy, plaintext)
                }
        }