]> git.proxmox.com Git - qemu-server.git/commit
gen_rand_chars: handle errors properly
authorFabian Grünbichler <f.gruenbichler@proxmox.com>
Mon, 22 Jun 2020 10:03:01 +0000 (12:03 +0200)
committerFabian Grünbichler <f.gruenbichler@proxmox.com>
Mon, 22 Jun 2020 10:03:01 +0000 (12:03 +0200)
commita4e128a9a9814618c4b63370e6215ba639b78011
treed0e607cfa64295f48728aa9a3456ca130ec2dfe6
parent3c5bdde815c503f2461d24db0caddaac37527a14
gen_rand_chars: handle errors properly

should not really happen on modern systems, but random_bytes just
returns false if it fails to generate random bytes, in which case we
want to die instead of returning an empty 'random' string.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
PVE/API2/Qemu.pm