gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[gnunet-scheme] 124/324: netstruct: Use the correct size for bounds chec


From: gnunet
Subject: [gnunet-scheme] 124/324: netstruct: Use the correct size for bounds checking in 'select'.
Date: Tue, 21 Sep 2021 13:22:44 +0200

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

maxime-devos pushed a commit to branch master
in repository gnunet-scheme.

commit 157878d501530a60fc51ad07dac066411e54dbb5
Author: Maxime Devos <maximedevos@telenet.be>
AuthorDate: Sat May 29 22:34:25 2021 +0200

    netstruct: Use the correct size for bounds checking in 'select'.
    
    Previously, it compared the size of the slice against
    the size of the field. Now it compares against the size
    of the whole structure, which should have been done in
    the first place.
    
    * gnu/gnunet/netstruct/procedural.scm
      (select): Perform size calculation on the whole netstructure,
      not only the field.
---
 gnu/gnunet/netstruct/procedural.scm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gnu/gnunet/netstruct/procedural.scm 
b/gnu/gnunet/netstruct/procedural.scm
index 19e6f00..69df9e4 100644
--- a/gnu/gnunet/netstruct/procedural.scm
+++ b/gnu/gnunet/netstruct/procedural.scm
@@ -207,7 +207,7 @@ network structure @var{ns}?"
 @var{ns} in the bytevector slice @var{ns}.  If the length
 of the slice @var{slice} is inappropriate, raise an appropriate
 exception instead."
-      (let ((expected-length (sizeof ns fields))
+      (let ((expected-length (sizeof ns '()))
            (found-length    (slice-length slice)))
        (unless (= found-length expected-length)
          (raise (%select-length-cond expected-length found-length)))

-- 
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]