aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorLibravatarLibravatar William Ahern <william@25thandclement.com> 2016-06-23 10:49:27 -0700
committerLibravatarLibravatar William Ahern <william@25thandclement.com> 2016-06-23 10:49:27 -0700
commit82b9b3af389b70ed38963ca8d6e2aa9f69b16450 (patch)
treea3c99c97b9cf5f785e3ec1360d309d9b86059c54 /src
parent36277465de786618aa94bc2d33c0ffce5e2102a3 (diff)
downloadluaossl-82b9b3af389b70ed38963ca8d6e2aa9f69b16450.tar.gz
luaossl-82b9b3af389b70ed38963ca8d6e2aa9f69b16450.tar.bz2
luaossl-82b9b3af389b70ed38963ca8d6e2aa9f69b16450.zip
initialize attr to NULL in xr_setExtensionByNid to silence clang, which can't see that has_attrs indirectly assures at least one iteration of the for loop (in the single-threaded case, at least)
Diffstat (limited to 'src')
-rw-r--r--src/openssl.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/openssl.c b/src/openssl.c
index f8c5047..6b74025 100644
--- a/src/openssl.c
+++ b/src/openssl.c
@@ -5516,6 +5516,7 @@ static int xr_setExtensionByNid(lua_State *L, X509_REQ *csr, int target_nid, voi
// Delete the old extensions attribute, so that the one we just added takes priority
if (has_attrs) {
+ attr = NULL;
for (pnid = X509_REQ_get_extension_nids(); *pnid != NID_undef; pnid++) {
idx = X509_REQ_get_attr_by_NID(csr, *pnid, -1);
if (idx == -1)