From: Dmitry V. Levin Date: Fri, 7 Dec 2012 21:38:52 +0000 (+0000) Subject: Fix *xattr decoding X-Git-Tag: v4.8~202 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=1f21513c38cbcb1d3d16e7b8ac0f17ef4793085e;p=strace Fix *xattr decoding * file.c (print_xattr_val): Do not attempt to decode a zero sized array. Fixes RH#885233. --- diff --git a/file.c b/file.c index b952e7f7..1cd8d3c0 100644 --- a/file.c +++ b/file.c @@ -2466,6 +2466,8 @@ print_xattr_val(struct tcb *tcp, int failed, unsigned long insize, unsigned long size) { + if (insize == 0) + failed = 1; if (!failed) { unsigned long capacity = 4 * size + 1; unsigned char *buf = (capacity < size) ? NULL : malloc(capacity);