aboutsummaryrefslogtreecommitdiffstats
path: root/crypto/openssl/crypto/asn1
diff options
context:
space:
mode:
authorJacques Vidrine <nectar@FreeBSD.org>2002-08-10 01:40:00 +0000
committerJacques Vidrine <nectar@FreeBSD.org>2002-08-10 01:40:00 +0000
commit9e6c5d1742cb27b1af95f09cda6cf8b330590e03 (patch)
treef0fcf1d2bc9428ac2d27136f2ac0d4a06cf28b96 /crypto/openssl/crypto/asn1
parentb1357e1cec95464ca388f5ea85e0b24cfac69efc (diff)
downloadsrc-9e6c5d1742cb27b1af95f09cda6cf8b330590e03.tar.gz
src-9e6c5d1742cb27b1af95f09cda6cf8b330590e03.zip
Import of OpenSSL 0.9.6f.
Notes
Notes: svn path=/vendor-crypto/openssl/dist/; revision=101613
Diffstat (limited to 'crypto/openssl/crypto/asn1')
-rw-r--r--crypto/openssl/crypto/asn1/asn1_lib.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/crypto/openssl/crypto/asn1/asn1_lib.c b/crypto/openssl/crypto/asn1/asn1_lib.c
index a3681c0e23c7..e4a56a926af7 100644
--- a/crypto/openssl/crypto/asn1/asn1_lib.c
+++ b/crypto/openssl/crypto/asn1/asn1_lib.c
@@ -57,6 +57,7 @@
*/
#include <stdio.h>
+#include <limits.h>
#include "cryptlib.h"
#include <openssl/asn1.h>
#include <openssl/asn1_mac.h>
@@ -141,7 +142,7 @@ err:
static int asn1_get_length(unsigned char **pp, int *inf, long *rl, int max)
{
unsigned char *p= *pp;
- long ret=0;
+ unsigned long ret=0;
int i;
if (max-- < 1) return(0);
@@ -170,10 +171,10 @@ static int asn1_get_length(unsigned char **pp, int *inf, long *rl, int max)
else
ret=i;
}
- if (ret < 0)
+ if (ret > LONG_MAX)
return 0;
*pp=p;
- *rl=ret;
+ *rl=(long)ret;
return(1);
}