From 0e8a7e403dca16b85ac96d65ca942d026c7ff8b4 Mon Sep 17 00:00:00 2001 From: Tomas Krnak Date: Sun, 20 Nov 2022 14:34:46 +0700 Subject: [PATCH] fix(core): define `length` variable --- core/src/apps/zcash/orchard/crypto/note_encryption.py | 1 + 1 file changed, 1 insertion(+) diff --git a/core/src/apps/zcash/orchard/crypto/note_encryption.py b/core/src/apps/zcash/orchard/crypto/note_encryption.py index 7a0b9a65e..fd71e8c44 100755 --- a/core/src/apps/zcash/orchard/crypto/note_encryption.py +++ b/core/src/apps/zcash/orchard/crypto/note_encryption.py @@ -49,6 +49,7 @@ def prf_ock_orchard( def chunks(size: int, buffer: bytes) -> Iterable[memoryview]: offset = 0 m = memoryview(buffer) + length = len(buffer) while offset + size <= length: yield m[offset : offset + size] offset += size