Re: [libvirt PATCH v2 2/2] qemu_migration_cookie: Properly fetch cert DN

2022-02-11 Thread Michal Prívozník
On 2/11/22 13:29, Jiri Denemark wrote: > 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 >

[libvirt PATCH v2 2/2] qemu_migration_cookie: Properly fetch cert DN

2022-02-11 Thread Jiri Denemark
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 --- Notes: Version 2: - do not pass NULL