Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 3 Jun 2018 18:32:11 +0000 (UTC)
From:      Piotr Pawel Stefaniak <pstef@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r334579 - head/usr.bin/indent
Message-ID:  <201806031832.w53IWBI1047920@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: pstef
Date: Sun Jun  3 18:32:11 2018
New Revision: 334579
URL: https://svnweb.freebsd.org/changeset/base/334579

Log:
  indent(1): ignore null characters from input

Modified:
  head/usr.bin/indent/io.c

Modified: head/usr.bin/indent/io.c
==============================================================================
--- head/usr.bin/indent/io.c	Sun Jun  3 18:29:20 2018	(r334578)
+++ head/usr.bin/indent/io.c	Sun Jun  3 18:32:11 2018	(r334579)
@@ -300,7 +300,8 @@ fill_buffer(void)
 		had_eof = true;
 		break;
 	}
-	*p++ = i;
+	if (i != '\0')
+	    *p++ = i;
 	if (i == '\n')
 		break;
     }



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201806031832.w53IWBI1047920>