Home
last modified time | relevance | path

Searched hist:a647502c (Results 1 – 1 of 1) sorted by relevance

/openbmc/qemu/hw/9pfs/
H A D9p.ca647502c Thu Jun 07 05:17:22 CDT 2018 Keno Fischer <keno@juliacomputing.com> 9p: xattr: Fix crashes due to free of uninitialized value

If the size returned from llistxattr/lgetxattr is 0, we skipped
the malloc call, leaving xattr.value uninitialized. However, this
value is later passed to `g_free` without any further checks,
causing an error. Fix that by always calling g_malloc unconditionally.
If `size` is 0, it will return NULL, which is safe to pass to g_free.

Signed-off-by: Keno Fischer <keno@juliacomputing.com>
Signed-off-by: Greg Kurz <groug@kaod.org>