diff options
author | Kazuki Yamaguchi <k@rhe.jp> | 2017-10-31 13:49:35 +0900 |
---|---|---|
committer | Kazuki Yamaguchi <k@rhe.jp> | 2017-10-31 13:49:35 +0900 |
commit | e6c64eea1e67361f0e39e06c7df918368f649ab9 (patch) | |
tree | 80fdbb813fa6163ac87415c70ea2d25c73142ca5 /crypto | |
parent | ffd23209933ea0ad5543f15ca6303d63d8dac826 (diff) | |
download | openssl-e6c64eea1e67361f0e39e06c7df918368f649ab9.tar.gz |
Prevent infinite loop when reading PEMky/pem-read-fix-unsigned-cast
BIO_gets() may return a negative number on failure. Do not cast into an
unsigned type before checking it.
Diffstat (limited to 'crypto')
-rw-r--r-- | crypto/pem/pem_lib.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/crypto/pem/pem_lib.c b/crypto/pem/pem_lib.c index 97b8a0d7c0..a4d7c34c8e 100644 --- a/crypto/pem/pem_lib.c +++ b/crypto/pem/pem_lib.c @@ -729,7 +729,7 @@ static int get_name(BIO *bp, char **name, unsigned int flags) { char *linebuf; int ret = 0; - size_t len; + int len; /* * Need to hold trailing NUL (accounted for by BIO_gets() and the newline |