projects
/
openssl.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Security fixes brought forward from 0.9.7.
[openssl.git]
/
crypto
/
asn1
/
t_x509.c
diff --git
a/crypto/asn1/t_x509.c
b/crypto/asn1/t_x509.c
index 5074a74928c4c2f239bc38396dd6c6145385cc6f..7bf28661502844dd07d71c41574795419cf28175 100644
(file)
--- a/
crypto/asn1/t_x509.c
+++ b/
crypto/asn1/t_x509.c
@@
-444,15
+444,17
@@
err:
int X509_NAME_print(BIO *bp, X509_NAME *name, int obase)
{
int X509_NAME_print(BIO *bp, X509_NAME *name, int obase)
{
- char *s,*c;
+ char *s,*c
,*b
;
int ret=0,l,ll,i,first=1;
int ret=0,l,ll,i,first=1;
- char buf[256];
ll=80-2-obase;
ll=80-2-obase;
-
s=X509_NAME_oneline(name,buf,256
);
+
b=s=X509_NAME_oneline(name,NULL,0
);
if (!*s)
if (!*s)
+ {
+ free(b);
return 1;
return 1;
+ }
s++; /* skip the first slash */
l=ll;
s++; /* skip the first slash */
l=ll;
@@
-508,6
+510,7
@@
int X509_NAME_print(BIO *bp, X509_NAME *name, int obase)
err:
X509err(X509_F_X509_NAME_PRINT,ERR_R_BUF_LIB);
}
err:
X509err(X509_F_X509_NAME_PRINT,ERR_R_BUF_LIB);
}
+ free(b);
return(ret);
}
return(ret);
}