[tor-commits] [trunnel] 01/02: Revert "Do not generate a `truncated:` for u8[] at end of struct"

gitolite role git at cupani.torproject.org
Thu May 5 12:51:35 UTC 2022


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

nickm pushed a commit to branch main
in repository trunnel.

commit 40c8548809d479d95e0d59efc383572ce97c0a37
Author: Nick Mathewson <nickm at torproject.org>
AuthorDate: Thu May 5 08:48:14 2022 -0400

    Revert "Do not generate a `truncated:` for u8[] at end of struct"
    
    This reverts commit 6d24296e10554867f974115e341762f06cfdccbf.
    
    I was modifying an _encode_ function when I should have modified the
    _decode_ function.
---
 lib/trunnel/CodeGen.py | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/lib/trunnel/CodeGen.py b/lib/trunnel/CodeGen.py
index 22dd8b8..e7ad11c 100644
--- a/lib/trunnel/CodeGen.py
+++ b/lib/trunnel/CodeGen.py
@@ -2223,8 +2223,7 @@ class EncodeFnGenerator(CodeGenerator):
 
         self.eltHeader(sva)
         if arrayIsBytes(sva):
-            if sva.widthfield is not None:
-                self.needTruncated = True
+            self.needTruncated = True
             self.format("""
                    {{
                      size_t elt_len = TRUNNEL_DYNARRAY_LEN(&obj->{c_name});

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the tor-commits mailing list