projects
/
openssl.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Increase internal security when using strncpy, by making sure the resulting string...
[openssl.git]
/
crypto
/
x509
/
x509_obj.c
diff --git
a/crypto/x509/x509_obj.c
b/crypto/x509/x509_obj.c
index f0271fdfa148d3d3ba25741ba262512bb59d53a3..1e718f76eb2dd0b37582e22110f7b002db2512d9 100644
(file)
--- 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);
OPENSSL_free(b);
}
strncpy(buf,"NO X509_NAME",len);
+ buf[len-1]='\0';
return buf;
}
return buf;
}