diff options
author | Karl Berry <karl@freefriends.org> | 2018-11-11 22:28:40 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2018-11-11 22:28:40 +0000 |
commit | d44eea999cae5122552689b8ab2ad0966e9f47af (patch) | |
tree | 3da57d57bc41073a4a8218d6a98599c1659a9989 /Build/source/texk | |
parent | c323e97ada4b9c09aee417afa1db2efe4ce12e99 (diff) |
check fgets return value, from Andreas
git-svn-id: svn://tug.org/texlive/trunk@49132 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk')
-rw-r--r-- | Build/source/texk/web2c/web2c/ChangeLog | 5 | ||||
-rw-r--r-- | Build/source/texk/web2c/web2c/fixwrites.c | 3 |
2 files changed, 7 insertions, 1 deletions
diff --git a/Build/source/texk/web2c/web2c/ChangeLog b/Build/source/texk/web2c/web2c/ChangeLog index 8f95a87ce2a..897e0b51804 100644 --- a/Build/source/texk/web2c/web2c/ChangeLog +++ b/Build/source/texk/web2c/web2c/ChangeLog @@ -1,3 +1,8 @@ +2018-11-11 Andreas Scherer <https://ascherer.github.io> + + * fixwrites.c (main): check return value from fgets. + (tex-k 11 Nov 2018 11:53:24) + 2018-06-08 Karl Berry <karl@freefriends.org> * common.defines (aopeninwithdirname): add. diff --git a/Build/source/texk/web2c/web2c/fixwrites.c b/Build/source/texk/web2c/web2c/fixwrites.c index 2c1f33608c8..0e28269afe2 100644 --- a/Build/source/texk/web2c/web2c/fixwrites.c +++ b/Build/source/texk/web2c/web2c/fixwrites.c @@ -311,7 +311,8 @@ main (int argc, string *argv) cmd = cp; while (!whole (buf)) /* make sure we have whole stmt */ { - fgets (&buf[strlen (buf)], BUFSIZ - strlen (buf), stdin); + if (!fgets (&buf[strlen (buf)], BUFSIZ - strlen (buf), stdin)) + break; remove_newline (buf); } |