String not properly NUL-terminated when no X509_NAME is given.
authorRichard Levitte <levitte@openssl.org>
Wed, 21 May 2003 14:44:59 +0000 (14:44 +0000)
committerRichard Levitte <levitte@openssl.org>
Wed, 21 May 2003 14:44:59 +0000 (14:44 +0000)
PR: 618

crypto/x509/x509_obj.c

index f0271fdfa148d3d3ba25741ba262512bb59d53a3..1e718f76eb2dd0b37582e22110f7b002db2512d9 100644 (file)
@@ -94,6 +94,7 @@ int i;
                OPENSSL_free(b);
                }
            strncpy(buf,"NO X509_NAME",len);
+           buf[len-1]='\0';
            return buf;
            }