From 04a4af6dd4fbfcfc564eac5eafe647b192ba3a8f Mon Sep 17 00:00:00 2001 From: Maxim Cournoyer Date: Thu, 18 Jun 2020 23:07:43 -0400 Subject: 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(-) (limited to 'gnu/system') diff --git a/gnu/system/uuid.scm b/gnu/system/uuid.scm index 225959e2b7..bc3af69610 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)))) -- cgit v1.2.3