This didn't get to the 0.9.8-dev thread...
authorRichard Levitte <levitte@openssl.org>
Wed, 13 Nov 2002 18:09:27 +0000 (18:09 +0000)
committerRichard Levitte <levitte@openssl.org>
Wed, 13 Nov 2002 18:09:27 +0000 (18:09 +0000)
apps/pkcs12.c
crypto/asn1/a_time.c
crypto/asn1/t_pkey.c

index 64b4b32be72fd5273e23d1e877b03090c173ec9d..536cf57c154533e92198f8181eac060055783096 100644 (file)
@@ -538,7 +538,7 @@ int MAIN(int argc, char **argv)
 #endif
 
        if(!noprompt &&
-               EVP_read_pw_string(pass, 50, "Enter Export Password:", 1))
+               EVP_read_pw_string(pass, sizeof pass, "Enter Export Password:", 1))
                {
                BIO_printf (bio_err, "Can't read Password\n");
                goto export_end;
index 27ddd30899bdcfa29dbfe34d7193bdaa69e5b140..6e5e9d845dc31afaba84798cc7f7f36ce43691ed 100644 (file)
@@ -152,7 +152,7 @@ ASN1_GENERALIZEDTIME *ASN1_TIME_to_generalizedtime(ASN1_TIME *t, ASN1_GENERALIZE
        if (t->data[0] >= '5') strcpy(str, "19");
        else strcpy(str, "20");
 
-       strcat(str, (char *)t->data);
+       BUF_strlcat(str, (char *)t->data, t->length+2);
 
        return ret;
        }
index bd89c1dc11bd6a531bbaaa35b8076d1460b6c4c3..73f32ff84f9302f16cdedfd4b795569566f7afcb 100644 (file)
@@ -562,18 +562,12 @@ static int print(BIO *bp, const char *number, BIGNUM *num, unsigned char *buf,
             int off)
        {
        int n,i;
-       char str[128];
        const char *neg;
 
        if (num == NULL) return(1);
        neg = (BN_get_sign(num))?"-":"";
-       if (off)
-               {
-               if (off > 128) off=128;
-               memset(str,' ',off);
-               if (BIO_write(bp,str,off) <= 0) return(0);
-               }
-
+       if(!BIO_indent(bp,off,128))
+               return 0;
        if (BN_is_zero(num))
                {
                if (BIO_printf(bp, "%s 0\n", number) <= 0)