From 1e84433f5ce636c1cf4ce417cf646816c8a3b947 Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Fri, 25 Jan 2002 13:04:32 +0000 Subject: [PATCH] * ldlex.l (yy_input): Correct error check. --- ld/ChangeLog | 4 ++++ ld/ldlex.l | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/ld/ChangeLog b/ld/ChangeLog index 12f639e5828..b8ddd14fabd 100644 --- a/ld/ChangeLog +++ b/ld/ChangeLog @@ -1,3 +1,7 @@ +2002-01-25 Andreas Jaeger + + * ldlex.l (yy_input): Correct error check. + 2002-01-25 Alan Modra * ldmisc.c (demangle): Put back dots when string not demangled. diff --git a/ld/ldlex.l b/ld/ldlex.l index 9f127f96d50..0b15ca2fab6 100644 --- a/ld/ldlex.l +++ b/ld/ldlex.l @@ -596,7 +596,7 @@ yy_input (buf, result, max_size) if (yyin) { *result = fread ((char *) buf, 1, max_size, yyin); - if (*result < 0) + if (*result < max_size && ferror (yyin)) einfo ("%F%P: read in flex scanner failed\n"); } } -- 2.30.2