fix a few bugs observed on http://www.viva64.com/en/b/0250/
authortedu <tedu@openbsd.org>
Wed, 16 Apr 2014 18:23:52 +0000 (18:23 +0000)
committertedu <tedu@openbsd.org>
Wed, 16 Apr 2014 18:23:52 +0000 (18:23 +0000)
ok krw miod

lib/libcrypto/asn1/asn1_gen.c
lib/libcrypto/asn1/asn1_par.c
lib/libssl/d1_both.c
lib/libssl/src/apps/s_server.c
lib/libssl/src/crypto/asn1/asn1_gen.c
lib/libssl/src/crypto/asn1/asn1_par.c
lib/libssl/src/ssl/d1_both.c

index 4fc2419..81a7a38 100644 (file)
@@ -368,7 +368,7 @@ static int asn1_cb(const char *elem, int len, void *bitstr)
                        arg->format = ASN1_GEN_FORMAT_UTF8;
                else if (!strncmp(vstart, "HEX", 3))
                        arg->format = ASN1_GEN_FORMAT_HEX;
-               else if (!strncmp(vstart, "BITLIST", 3))
+               else if (!strncmp(vstart, "BITLIST", 7))
                        arg->format = ASN1_GEN_FORMAT_BITLIST;
                else
                        {
index 29b0ba4..e34c75a 100644 (file)
@@ -375,7 +375,7 @@ static int asn1_parse2(BIO *bp, const unsigned char **pp, long length, int offse
                                        }
                                else
                                        {
-                                       if (BIO_write(bp,"BAD ENUMERATED",11) <= 0)
+                                       if (BIO_write(bp,"BAD ENUMERATED",14) <= 0)
                                                goto end;
                                        }
                                M_ASN1_ENUMERATED_free(bs);
index ab6b168..731245c 100644 (file)
@@ -1213,7 +1213,6 @@ dtls1_retransmit_message(SSL *s, unsigned short seq, unsigned long frag_off,
        saved_state.compress = s->compress;
        saved_state.session = s->session;
        saved_state.epoch = s->d1->w_epoch;
-       saved_state.epoch = s->d1->w_epoch;
 
        s->d1->retransmitting = 1;
 
index 8d75680..74cd2c8 100644 (file)
@@ -2494,7 +2494,7 @@ static int www_body(char *hostname, int s, unsigned char *context)
 
                /* else we have data */
                if (    ((www == 1) && (strncmp("GET ",buf,4) == 0)) ||
-                       ((www == 2) && (strncmp("GET /stats ",buf,10) == 0)))
+                       ((www == 2) && (strncmp("GET /stats ",buf,11) == 0)))
                        {
                        char *p;
                        X509 *peer;
index 4fc2419..81a7a38 100644 (file)
@@ -368,7 +368,7 @@ static int asn1_cb(const char *elem, int len, void *bitstr)
                        arg->format = ASN1_GEN_FORMAT_UTF8;
                else if (!strncmp(vstart, "HEX", 3))
                        arg->format = ASN1_GEN_FORMAT_HEX;
-               else if (!strncmp(vstart, "BITLIST", 3))
+               else if (!strncmp(vstart, "BITLIST", 7))
                        arg->format = ASN1_GEN_FORMAT_BITLIST;
                else
                        {
index 29b0ba4..e34c75a 100644 (file)
@@ -375,7 +375,7 @@ static int asn1_parse2(BIO *bp, const unsigned char **pp, long length, int offse
                                        }
                                else
                                        {
-                                       if (BIO_write(bp,"BAD ENUMERATED",11) <= 0)
+                                       if (BIO_write(bp,"BAD ENUMERATED",14) <= 0)
                                                goto end;
                                        }
                                M_ASN1_ENUMERATED_free(bs);
index ab6b168..731245c 100644 (file)
@@ -1213,7 +1213,6 @@ dtls1_retransmit_message(SSL *s, unsigned short seq, unsigned long frag_off,
        saved_state.compress = s->compress;
        saved_state.session = s->session;
        saved_state.epoch = s->d1->w_epoch;
-       saved_state.epoch = s->d1->w_epoch;
 
        s->d1->retransmitting = 1;