diff options
| author | Jung-uk Kim <jkim@FreeBSD.org> | 2018-11-20 18:59:41 +0000 | 
|---|---|---|
| committer | Jung-uk Kim <jkim@FreeBSD.org> | 2018-11-20 18:59:41 +0000 | 
| commit | 8c3f9abd70b3f447a4795c1b00b386b044fb322d (patch) | |
| tree | 884976f2693f42bade35b92edc3c1f7f8c53825b /crypto/bio/bio_lib.c | |
| parent | a43ce912fc025d11e1395506111f75fc194d7ba5 (diff) | |
Diffstat (limited to 'crypto/bio/bio_lib.c')
| -rw-r--r-- | crypto/bio/bio_lib.c | 4 | 
1 files changed, 2 insertions, 2 deletions
| diff --git a/crypto/bio/bio_lib.c b/crypto/bio/bio_lib.c index 95eef7d4bf5b..ca375b911ae8 100644 --- a/crypto/bio/bio_lib.c +++ b/crypto/bio/bio_lib.c @@ -52,7 +52,7 @@ static long bio_call_callback(BIO *b, int oper, const char *argp, size_t len,          argi = (int)len;      } -    if (inret && (oper & BIO_CB_RETURN) && bareoper != BIO_CB_CTRL) { +    if (inret > 0 && (oper & BIO_CB_RETURN) && bareoper != BIO_CB_CTRL) {          if (*processed > INT_MAX)              return -1;          inret = *processed; @@ -60,7 +60,7 @@ static long bio_call_callback(BIO *b, int oper, const char *argp, size_t len,      ret = b->callback(b, oper, argp, argi, argl, inret); -    if (ret >= 0 && (oper & BIO_CB_RETURN) && bareoper != BIO_CB_CTRL) { +    if (ret > 0 && (oper & BIO_CB_RETURN) && bareoper != BIO_CB_CTRL) {          *processed = (size_t)ret;          ret = 1;      } | 
