diff options
Diffstat (limited to 'tests/test_basic.c')
| -rw-r--r-- | tests/test_basic.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/test_basic.c b/tests/test_basic.c index 0834728bb926..5a977aa7191a 100644 --- a/tests/test_basic.c +++ b/tests/test_basic.c @@ -78,7 +78,9 @@ main (int argc, char **argv) while (!feof (in)) { memset (inbuf, 0, sizeof (inbuf)); - (void)fread (inbuf, sizeof (inbuf) - 1, 1, in); + if (fread (inbuf, 1, sizeof (inbuf) - 1, in) == 0) { + break; + } inlen = strlen (inbuf); test_in = malloc (inlen); memcpy (test_in, inbuf, inlen); |
