Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/crypto/dist/openssl http://marc.theaimsgroup.com/?l=openssl-...



details:   https://anonhg.NetBSD.org/src/rev/d14049de2f2e
branches:  trunk
changeset: 534801:d14049de2f2e
user:      itojun <itojun%NetBSD.org@localhost>
date:      Sat Aug 03 12:56:23 2002 +0000

description:
http://marc.theaimsgroup.com/?l=openssl-cvs&m=102831422608153&w=2

  *) Fix ASN1 checks. Check for overflow by comparing with LONG_MAX
     and get fix the header length calculation.
     [Florian Weimer <Weimer%CERT.Uni-Stuttgart.DE@localhost>,
      Alon Kantor <alonk%checkpoint.com@localhost> (and others),
      Steve Henson]

(critical)

diffstat:

 crypto/dist/openssl/CHANGES                |  6 ++++++
 crypto/dist/openssl/crypto/asn1/asn1_lib.c |  7 ++++---
 2 files changed, 10 insertions(+), 3 deletions(-)

diffs (49 lines):

diff -r 53996d73bd4b -r d14049de2f2e crypto/dist/openssl/CHANGES
--- a/crypto/dist/openssl/CHANGES       Sat Aug 03 11:37:17 2002 +0000
+++ b/crypto/dist/openssl/CHANGES       Sat Aug 03 12:56:23 2002 +0000
@@ -2,6 +2,12 @@
  OpenSSL CHANGES
  _______________
 
+  *) Fix ASN1 checks. Check for overflow by comparing with LONG_MAX
+     and get fix the header length calculation.
+     [Florian Weimer <Weimer%CERT.Uni-Stuttgart.DE@localhost>,
+      Alon Kantor <alonk%checkpoint.com@localhost> (and others),
+      Steve Henson]
+
  Changes between 0.9.6d and 0.9.6e  [30 Jul 2002]
 
   *) Fix cipher selection routines: ciphers without encryption had no flags
diff -r 53996d73bd4b -r d14049de2f2e crypto/dist/openssl/crypto/asn1/asn1_lib.c
--- a/crypto/dist/openssl/crypto/asn1/asn1_lib.c        Sat Aug 03 11:37:17 2002 +0000
+++ b/crypto/dist/openssl/crypto/asn1/asn1_lib.c        Sat Aug 03 12:56:23 2002 +0000
@@ -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 @@
 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 @@
                else
                        ret=i;
                }
-       if (ret < 0)
+       if (ret > LONG_MAX)
                return 0;
        *pp=p;
-       *rl=ret;
+       *rl=(long)ret;
        return(1);
        }
 



Home | Main Index | Thread Index | Old Index