[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

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



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@xxxxxxxxxxxxxx>
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.
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits