diff options
author | 2007-04-06 18:35:16 +0000 | |
---|---|---|
committer | 2007-04-06 18:35:16 +0000 | |
commit | 81f28ae59827499536c573717267524e203fa6ec (patch) | |
tree | 81f862ebb9c5675a2364026905d29e7df3898171 /lib/libssl/src | |
parent | Include update statistics in the bgpctl show neighbor output. (diff) | |
download | wireguard-openbsd-81f28ae59827499536c573717267524e203fa6ec.tar.xz wireguard-openbsd-81f28ae59827499536c573717267524e203fa6ec.zip |
Add proper checks against fgets failure. From Charles Longeau.
OK moritz@, millert@, and jaredy@.
Diffstat (limited to 'lib/libssl/src')
-rw-r--r-- | lib/libssl/src/crypto/ui/ui_openssl.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/libssl/src/crypto/ui/ui_openssl.c b/lib/libssl/src/crypto/ui/ui_openssl.c index 75318d48a14..d03aeba91ac 100644 --- a/lib/libssl/src/crypto/ui/ui_openssl.c +++ b/lib/libssl/src/crypto/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); } |