diff options
| author | Keno Fischer <keno@juliacomputing.com> | 2018-06-07 12:17:22 +0200 |
|---|---|---|
| committer | Greg Kurz <groug@kaod.org> | 2018-06-07 12:17:22 +0200 |
| commit | a647502c582981c395b5d16e52a22ac7aff0fb2b (patch) | |
| tree | 0c523ce85c17bf164dba25bd35beef05e95a1b9f /chardev/char-stdio.c | |
| parent | ec70b956fddf628ee2e42521c54362e80115a3c4 (diff) | |
| download | focaccia-qemu-a647502c582981c395b5d16e52a22ac7aff0fb2b.tar.gz focaccia-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 'chardev/char-stdio.c')
0 files changed, 0 insertions, 0 deletions