]> git.ipfire.org Git - thirdparty/libvirt.git/commit
qemu_migration_cookie: Properly fetch cert DN
authorJiri Denemark <jdenemar@redhat.com>
Thu, 10 Feb 2022 15:16:48 +0000 (16:16 +0100)
committerJiri Denemark <jdenemar@redhat.com>
Fri, 11 Feb 2022 14:06:19 +0000 (15:06 +0100)
commit3a311593e5eb8d464a6033ccfab62932c701071d
tree7e7324bde1a2fdeed2074cb760e3ebde1f6f1478
parentd116f187c69c3eefa9bfeafaf7242009f2adf531
qemu_migration_cookie: Properly fetch cert DN

If 1024 was not enough to fit the DN, gnutls_x509_crt_get_dn would store
the required size in subjectlen. And since we're not checking the return
value of this function, we would happily overwrite some random memory.

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
src/qemu/qemu_migration_cookie.c