summaryrefslogtreecommitdiff
path: root/usr/src/lib
diff options
context:
space:
mode:
authorToomas Soome <tsoome@me.com>2019-01-21 19:46:47 +0200
committerToomas Soome <tsoome@me.com>2019-06-18 21:39:52 +0300
commit281eb3a97ad0e298603325ba7c56d0222aaa5ac3 (patch)
treea9640fe090dd7a111d12f088c4ad509b9ca5bfb9 /usr/src/lib
parentd5fa36a7366530f78b3c5d1cd4c4a40085383b9f (diff)
downloadillumos-joyent-281eb3a97ad0e298603325ba7c56d0222aaa5ac3.tar.gz
11114 libsecdb: NULL pointer errors
Reviewed by: Peter Tribble <peter.tribble@gmail.com> Approved by: Dan McDonald <danmcd@joyent.com>
Diffstat (limited to 'usr/src/lib')
-rw-r--r--usr/src/lib/libsecdb/common/chkauthattr.c4
-rw-r--r--usr/src/lib/libsecdb/common/secdb.c4
2 files changed, 4 insertions, 4 deletions
diff --git a/usr/src/lib/libsecdb/common/chkauthattr.c b/usr/src/lib/libsecdb/common/chkauthattr.c
index e76db0af24..b3c830374a 100644
--- a/usr/src/lib/libsecdb/common/chkauthattr.c
+++ b/usr/src/lib/libsecdb/common/chkauthattr.c
@@ -99,7 +99,7 @@ _enum_common_p(const char *cprofiles,
if (cprofiles == NULL)
return (0);
- if (*pcnt > 0 && strcmp(profs[*pcnt - 1], PROFILE_STOP) == NULL)
+ if (*pcnt > 0 && strcmp(profs[*pcnt - 1], PROFILE_STOP) == 0)
return (0);
COPYTOSTACK(profiles, cprofiles)
@@ -333,7 +333,7 @@ _auth_match_noun(const char *pattern, const char *auth,
if (strncmp(pattern, auth, pattern_len - 1) == 0) {
grant = strrchr(auth, '.');
if (grant != NULL) {
- if (strncmp(grant + 1, "grant", 5) != NULL)
+ if (strncmp(grant + 1, "grant", 5) != 0)
return (1);
}
}
diff --git a/usr/src/lib/libsecdb/common/secdb.c b/usr/src/lib/libsecdb/common/secdb.c
index e012d95ce0..7378ce11f4 100644
--- a/usr/src/lib/libsecdb/common/secdb.c
+++ b/usr/src/lib/libsecdb/common/secdb.c
@@ -257,7 +257,7 @@ _kva_dup(kva_t *old_kva)
int size;
kv_t *old_data;
kv_t *new_data;
- kva_t *nkva = NULL;
+ kva_t *nkva = NULL;
if (old_kva == NULL) {
return (NULL);
@@ -339,7 +339,7 @@ _argv_to_csl(char **strings)
(void) strcat(newstr, strings[i]);
(void) strcat(newstr, ",");
}
- newstr[len-1] = NULL;
+ newstr[len-1] = '\0';
return (newstr);
} else
return (NULL);