aboutsummaryrefslogtreecommitdiff
path: root/scripts/dump-guest-memory.py
diff options
context:
space:
mode:
authorKeno Fischer <keno@juliacomputing.com>2018-06-07 12:17:22 +0200
committerGreg Kurz <groug@kaod.org>2018-06-07 12:17:22 +0200
commita647502c582981c395b5d16e52a22ac7aff0fb2b (patch)
tree0c523ce85c17bf164dba25bd35beef05e95a1b9f /scripts/dump-guest-memory.py
parentec70b956fddf628ee2e42521c54362e80115a3c4 (diff)
downloadqemu-a647502c582981c395b5d16e52a22ac7aff0fb2b.zip
qemu-a647502c582981c395b5d16e52a22ac7aff0fb2b.tar.gz
qemu-a647502c582981c395b5d16e52a22ac7aff0fb2b.tar.bz2
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>
Diffstat (limited to 'scripts/dump-guest-memory.py')
0 files changed, 0 insertions, 0 deletions