Move the SCT List extension parser into libssl.
[openssl.git] / crypto / objects / obj_dat.c
index e999ef7831a231b426c486608432f3ba6173ba56..959ad65d99c3fb5aece207af10740e67bf478ac1 100644 (file)
@@ -207,7 +207,7 @@ static IMPLEMENT_LHASH_DOALL_FN(cleanup2, ADDED_OBJ)
 static IMPLEMENT_LHASH_DOALL_FN(cleanup3, ADDED_OBJ)
 
 /* The purpose of obj_cleanup_defer is to avoid EVP_cleanup() attempting
- * to use freed up OIDs. If neccessary the actual freeing up of OIDs is
+ * to use freed up OIDs. If necessary the actual freeing up of OIDs is
  * delayed.
  */
 
@@ -483,10 +483,13 @@ int OBJ_obj2txt(char *buf, int buf_len, const ASN1_OBJECT *a, int no_name)
                s=OBJ_nid2ln(nid);
                if (s == NULL)
                        s=OBJ_nid2sn(nid);
-               if (buf)
-                       BUF_strlcpy(buf,s,buf_len);
-               n=strlen(s);
-               return n;
+               if (s)
+                       {
+                       if (buf)
+                               BUF_strlcpy(buf,s,buf_len);
+                       n=strlen(s);
+                       return n;
+                       }
                }