diff options
| author | Keno Fischer | 2018-06-07 12:17:22 +0200 |
|---|---|---|
| committer | Greg Kurz | 2018-06-07 12:17:22 +0200 |
| commit | a647502c582981c395b5d16e52a22ac7aff0fb2b (patch) | |
| tree | 0c523ce85c17bf164dba25bd35beef05e95a1b9f /linux-headers/linux | |
| parent | 9p: Move a couple xattr functions to 9p-util (diff) | |
| download | qemu-a647502c582981c395b5d16e52a22ac7aff0fb2b.tar.gz qemu-a647502c582981c395b5d16e52a22ac7aff0fb2b.tar.xz qemu-a647502c582981c395b5d16e52a22ac7aff0fb2b.zip | |
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 'linux-headers/linux')
0 files changed, 0 insertions, 0 deletions
