diff options
Diffstat (limited to 'tools/gpg-check-pattern.c')
-rw-r--r-- | tools/gpg-check-pattern.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/gpg-check-pattern.c b/tools/gpg-check-pattern.c index 77176cc..c2e3b5f 100644 --- a/tools/gpg-check-pattern.c +++ b/tools/gpg-check-pattern.c @@ -286,7 +286,7 @@ read_file (const char *fname, size_t *r_length) buflen = st.st_size; buf = xmalloc (buflen+1); - if (es_fread (buf, buflen, 1, fp) != 1) + if (buflen && es_fread (buf, buflen, 1, fp) != 1) { log_error ("error reading '%s': %s\n", fname, strerror (errno)); es_fclose (fp); |