diff options
Diffstat (limited to 'Build/source/texk/kpathsea/line.c')
-rw-r--r-- | Build/source/texk/kpathsea/line.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/Build/source/texk/kpathsea/line.c b/Build/source/texk/kpathsea/line.c index 6c66a302b7f..7d677a5599a 100644 --- a/Build/source/texk/kpathsea/line.c +++ b/Build/source/texk/kpathsea/line.c @@ -1,6 +1,6 @@ /* line.c: return the next line from a file, or NULL. - Copyright 1992, 1993, 1995, 1996, 2008, 2013, 2014 Karl Berry. + Copyright 1992, 1993, 1995, 1996, 2008, 2013, 2014, 2020 Karl Berry. Copyright 1998, 1999, 2001, 2005 Olaf Weber. This library is free software; you can redistribute it and/or @@ -55,6 +55,11 @@ read_line (FILE *f) FLOCKFILE (f); while ((c = getc (f)) != EOF && c != '\n' && c != '\r') { + /* Silently drop null bytes. */ + if (c == 0) { + continue; + } + line[loc] = c; loc++; |