summaryrefslogtreecommitdiffstats
path: root/crypto/x509/x509_obj.c
diff options
context:
space:
mode:
authorRichard Levitte <levitte@openssl.org>2002-02-28 12:42:19 +0000
committerRichard Levitte <levitte@openssl.org>2002-02-28 12:42:19 +0000
commit26414ee013170f2d8e42b1995dbb30c03e7ed16c (patch)
tree8c063e88267e1cc018fb3a71a74b35962249702f /crypto/x509/x509_obj.c
parent5c62f68e14f38101e2a1dd969b1d5f587a16bfdb (diff)
Increase internal security when using strncpy, by making sure the resulting string is NUL-terminated
Diffstat (limited to 'crypto/x509/x509_obj.c')
-rw-r--r--crypto/x509/x509_obj.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/crypto/x509/x509_obj.c b/crypto/x509/x509_obj.c
index f0271fdfa1..1e718f76eb 100644
--- a/crypto/x509/x509_obj.c
+++ b/crypto/x509/x509_obj.c
@@ -94,6 +94,7 @@ int i;
OPENSSL_free(b);
}
strncpy(buf,"NO X509_NAME",len);
+ buf[len-1]='\0';
return buf;
}