# HG changeset patch # User Kim Alvefur # Date 1558198285 -7200 # Node ID 8297408db58bcde4ba06beb8c8fc436ff8d172b4 # Parent 5d2f7144fa1227318c13a521d92bb8f9ba7cd391 util.random: Coerce error to string (thanks waqas) In theory this could happen in an EOF condition, which should be impossible with a read from /dev/urandom. diff -r 5d2f7144fa12 -r 8297408db58b util/random.lua --- a/util/random.lua Sat May 18 17:28:21 2019 +0200 +++ b/util/random.lua Sat May 18 18:51:25 2019 +0200 @@ -14,7 +14,7 @@ local function bytes(n) local data, err = urandom:read(n); if not data then - error("Unable to retrieve data from secure random number generator (/dev/urandom): "..err); + error("Unable to retrieve data from secure random number generator (/dev/urandom): "..tostring(err)); end return data; end