Heyman, Michael | 24 Sep 2007 20:44

Bug in scepd

The scepd program was regularly core dumping when no unstructuredName
existed in a request. The bug appears to be due to an uninitialized
variable in scepldap.c:x509_to_ldap(). (patch below).

-Michael Heyman

--- scepldap.c.old	Mon Sep 24 14:33:41 2007
+++ scepldap.c	Mon Sep 24 14:32:58 2007
 <at>  <at>  -27,11 +27,11  <at>  <at> 
  *   and concatenated to give a distinguished name
  */
 char	*x509_to_ldap(scep_t *scep, X509_NAME *name) {
 	char		*dn = NULL;
 	int		ncomponents, dl = 0, nl, i, dnl;
-	X509_NAME_ENTRY	*ne;
+	X509_NAME_ENTRY	*ne = 0;
 	char		oname[1024];
 	const char	*sn;
 	ASN1_OBJECT	*us;
 	ASN1_STRING	*as;


Gmane