diff options
-rw-r--r-- | apps/dgst.c | 2 | ||||
-rw-r--r-- | apps/enc.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/apps/dgst.c b/apps/dgst.c index 7b43338586..b44468bc79 100644 --- a/apps/dgst.c +++ b/apps/dgst.c @@ -461,7 +461,7 @@ int do_fp(BIO *out, unsigned char *buf, BIO *bp, int sep, int binout, size_t len; int i, backslash = 0; - for (;;) { + while (BIO_pending(bp) || !BIO_eof(bp)) { i = BIO_read(bp, (char *)buf, BUFSIZE); if (i < 0) { BIO_printf(bio_err, "Read Error in %s\n", file); diff --git a/apps/enc.c b/apps/enc.c index 57ce924337..d2505639e0 100644 --- a/apps/enc.c +++ b/apps/enc.c @@ -586,7 +586,7 @@ int enc_main(int argc, char **argv) if (benc != NULL) wbio = BIO_push(benc, wbio); - for (;;) { + while (BIO_pending(rbio) || !BIO_eof(rbio)) { inl = BIO_read(rbio, (char *)buff, bsize); if (inl <= 0) break; |