summaryrefslogtreecommitdiffstats
path: root/contrib/file/compress.c
diff options
context:
space:
mode:
authordelphij <delphij@FreeBSD.org>2009-05-18 22:34:33 +0000
committerdelphij <delphij@FreeBSD.org>2009-05-18 22:34:33 +0000
commit94241912dc47864055ebcbc3eed24cc0cdafc6f4 (patch)
tree337723a5b888e6f022d551b74c01b12f3a528fce /contrib/file/compress.c
parent6048eaa315a3fd595e7f9f99cfcff0d39bdfab55 (diff)
parent862d9405b857dba35f8f2eb6d0623b9a552d4353 (diff)
downloadFreeBSD-src-94241912dc47864055ebcbc3eed24cc0cdafc6f4.zip
FreeBSD-src-94241912dc47864055ebcbc3eed24cc0cdafc6f4.tar.gz
Merge vendor/file/dist@192348, bringing FILE 5.03 to 8-CURRENT.
Security: CVE-2009-1515
Diffstat (limited to 'contrib/file/compress.c')
-rw-r--r--contrib/file/compress.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/contrib/file/compress.c b/contrib/file/compress.c
index 0a30803..28dacd3 100644
--- a/contrib/file/compress.c
+++ b/contrib/file/compress.c
@@ -35,7 +35,7 @@
#include "file.h"
#ifndef lint
-FILE_RCSID("@(#)$File: compress.c,v 1.61 2009/02/03 20:27:51 christos Exp $")
+FILE_RCSID("@(#)$File: compress.c,v 1.63 2009/03/23 14:21:51 christos Exp $")
#endif
#include "magic.h"
@@ -76,6 +76,7 @@ private const struct {
/* ...only first file examined */
{ "BZh", 3, { "bzip2", "-cd", NULL }, 1 }, /* bzip2-ed */
{ "LZIP", 4, { "lzip", "-cdq", NULL }, 1 },
+ { "\3757zXZ\0",6,{ "xz", "-cd", NULL }, 1 }, /* XZ Utils */
};
private size_t ncompr = sizeof(compr) / sizeof(compr[0]);
@@ -486,6 +487,8 @@ err:
#else
(void)wait(NULL);
#endif
+ (void) close(fdin[0]);
+
return n;
}
}
OpenPOWER on IntegriCloud