diff options
-rw-r--r-- | lib/libcrypto/ui/ui_openssl.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/libcrypto/ui/ui_openssl.c b/lib/libcrypto/ui/ui_openssl.c index 75318d48a14..d03aeba91ac 100644 --- a/lib/libcrypto/ui/ui_openssl.c +++ b/lib/libcrypto/ui/ui_openssl.c @@ -383,7 +383,8 @@ static void read_till_nl(FILE *in) char buf[SIZE+1]; do { - fgets(buf,SIZE,in); + if (fgets(buf,sizeof(buf),in) == NULL) + break; } while (strchr(buf,'\n') == NULL); } |