commit | 1f21513c38cbcb1d3d16e7b8ac0f17ef4793085e | [log] [tgz] |
---|---|---|
author | Dmitry V. Levin <ldv@altlinux.org> | Fri Dec 07 21:38:52 2012 +0000 |
committer | Dmitry V. Levin <ldv@altlinux.org> | Sat Dec 08 00:18:45 2012 +0000 |
tree | 892e25af9e2032a1d50f1298648acebeba0f160e | |
parent | eff5c0e60c35d852a97a26cd8c6be50fed75a1a0 [diff] [blame] |
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 b952e7f..1cd8d3c 100644 --- a/file.c +++ b/file.c
@@ -2466,6 +2466,8 @@ 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);