diff options
author | marha <marha@users.sourceforge.net> | 2011-04-13 07:49:50 +0000 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2011-04-13 07:49:50 +0000 |
commit | 7bcdd32ccff794b9a83a88ff9bc2d0b7b088bd06 (patch) | |
tree | d5d217cd4d21932fa490076d0dea9a259a9a8a31 /openssl/crypto/x509v3/v3_addr.c | |
parent | 125aba11ec484309e4dc5b2abf1b15ac98784159 (diff) | |
download | vcxsrv-7bcdd32ccff794b9a83a88ff9bc2d0b7b088bd06.tar.gz vcxsrv-7bcdd32ccff794b9a83a88ff9bc2d0b7b088bd06.tar.bz2 vcxsrv-7bcdd32ccff794b9a83a88ff9bc2d0b7b088bd06.zip |
Updated to openssl-1.0.0d
Diffstat (limited to 'openssl/crypto/x509v3/v3_addr.c')
-rw-r--r-- | openssl/crypto/x509v3/v3_addr.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/openssl/crypto/x509v3/v3_addr.c b/openssl/crypto/x509v3/v3_addr.c index 9087d66e0..0d70e8696 100644 --- a/openssl/crypto/x509v3/v3_addr.c +++ b/openssl/crypto/x509v3/v3_addr.c @@ -177,12 +177,18 @@ static int i2r_address(BIO *out, unsigned char addr[ADDR_RAW_BUF_LEN]; int i, n; + if (bs->length < 0) + return 0; switch (afi) { case IANA_AFI_IPV4: + if (bs->length > 4) + return 0; addr_expand(addr, bs, 4, fill); BIO_printf(out, "%d.%d.%d.%d", addr[0], addr[1], addr[2], addr[3]); break; case IANA_AFI_IPV6: + if (bs->length > 16) + return 0; addr_expand(addr, bs, 16, fill); for (n = 16; n > 1 && addr[n-1] == 0x00 && addr[n-2] == 0x00; n -= 2) ; |