Browse Source

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.
gn-latest-20200725
Maxim Cournoyer 1 year ago
parent
commit
04a4af6dd4
No known key found for this signature in database GPG Key ID: 1260E46482E63562
  1. 2
      gnu/system/uuid.scm

2
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))))
Loading…
Cancel
Save