guix-commits
[Top][All Lists]
Advanced

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

02/02: uuid: Prevent a loop on invalid arguments.


From: guix-commits
Subject: 02/02: uuid: Prevent a loop on invalid arguments.
Date: Thu, 18 Jun 2020 23:29:21 -0400 (EDT)

apteryx pushed a commit to branch master
in repository guix.

commit 04a4af6dd4fbfcfc564eac5eafe647b192ba3a8f
Author: Maxim Cournoyer <maxim.cournoyer@gmail.com>
AuthorDate: Thu Jun 18 23:07:43 2020 -0400

    uuid: Prevent a loop on invalid arguments.
    
    * gnu/system/uuid.scm (uuid=?): Use type predicates in the fallback case to
    prevent looping on invalid arguments.
---
 gnu/system/uuid.scm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gnu/system/uuid.scm b/gnu/system/uuid.scm
index 225959e..bc3af69 100644
--- a/gnu/system/uuid.scm
+++ b/gnu/system/uuid.scm
@@ -298,5 +298,5 @@ corresponding bytevector; otherwise return #f."
      (bytevector=? (uuid-bytevector a) b))
     (((? uuid? a) (? uuid? b))
      (bytevector=? (uuid-bytevector a) (uuid-bytevector b)))
-    ((a b)
+    (((or (? uuid? a) (? bytevector? a)) (or (? uuid? b) (? bytevector? b)))
      (uuid=? b a))))



reply via email to

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