Write NUL (\0) byte, not space.
authorRichard W.M. Jones <rjones@redhat.com>
Wed, 23 Oct 2013 06:37:08 +0000 (07:37 +0100)
committerRichard W.M. Jones <rjones@redhat.com>
Wed, 23 Oct 2013 06:37:13 +0000 (07:37 +0100)
pxzcat.c

index 80a8820..7e036d0 100644 (file)
--- a/pxzcat.c
+++ b/pxzcat.c
@@ -175,7 +175,7 @@ xzfile_uncompress (const char *filename, const char *outputfile,
   if (ofd == -1)
     error (EXIT_FAILURE, errno, "open: %s", outputfile);
   /* See above about auto_da_alloc. */
   if (ofd == -1)
     error (EXIT_FAILURE, errno, "open: %s", outputfile);
   /* See above about auto_da_alloc. */
-  write (ofd, " ", 1);
+  write (ofd, "\0", 1);
 
   if (ftruncate (ofd, size) == -1)
     error (EXIT_FAILURE, errno, "ftruncate: %s", outputfile);
 
   if (ftruncate (ofd, size) == -1)
     error (EXIT_FAILURE, errno, "ftruncate: %s", outputfile);