diff options
author | Akira Kakuto <kakuto@fuk.kindai.ac.jp> | 2019-01-09 23:14:12 +0000 |
---|---|---|
committer | Akira Kakuto <kakuto@fuk.kindai.ac.jp> | 2019-01-09 23:14:12 +0000 |
commit | b8b72a0740514b41b570cda48d26ef3999463023 (patch) | |
tree | fe06e6fc8c5f58ea50dad8854bceb652df64c7af /Build/source/utils/autosp/autosp-src/tex2aspc.c | |
parent | 9823a3300cfc8502e141583168741e3d8f757537 (diff) |
autosp 2019-01-08
git-svn-id: svn://tug.org/texlive/trunk@49653 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/utils/autosp/autosp-src/tex2aspc.c')
-rw-r--r-- | Build/source/utils/autosp/autosp-src/tex2aspc.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/Build/source/utils/autosp/autosp-src/tex2aspc.c b/Build/source/utils/autosp/autosp-src/tex2aspc.c index 98c64842038..23fd0907641 100644 --- a/Build/source/utils/autosp/autosp-src/tex2aspc.c +++ b/Build/source/utils/autosp/autosp-src/tex2aspc.c @@ -1,6 +1,6 @@ -char version[12] = "2017-12-15"; +char version[12] = "2019-01-08"; -/* Copyright (C) 2017 R. D. Tennent School of Computing, +/* Copyright (C) 2017-19 R. D. Tennent School of Computing, * Queen's University, rdt@cs.queensu.ca * * This program is free software; you can redistribute it @@ -101,6 +101,8 @@ void analyze_notes (char **ln) char *nl; if (fgets (new_line, LINE_LEN, infile) == NULL) error ("Unexpected EOF."); + if (strlen (new_line) == LINE_LEN-1) + error ("Line too long."); nl = new_line; while (*nl == ' ') nl++; /* avoid spaces */ t = strpbrk (s, "\n%"); @@ -246,7 +248,10 @@ void process_score () while ( c != EOF ) { ungetc (c, infile); - fgets(line, LINE_LEN, infile); + if ( fgets(line, LINE_LEN, infile) == NULL) + error ("Unexpected EOF."); + if (strlen (line) == LINE_LEN-1) + error ("Line too long."); lineno++; process_line (); c = getc (infile); |