From 5d88111a142b3c37e92bdd36699a04fd054d27f4 Mon Sep 17 00:00:00 2001 From: Xavi Hernandez Date: Wed, 22 May 2019 17:46:19 +0200 Subject: Fix some "Null pointer dereference" coverity issues This patch fixes the following CID's: * 1124829 * 1274075 * 1274083 * 1274128 * 1274135 * 1274141 * 1274143 * 1274197 * 1274205 * 1274210 * 1274211 * 1288801 * 1398629 Change-Id: Ia7c86cfab3245b20777ffa296e1a59748040f558 Updates: bz#789278 Signed-off-by: Xavi Hernandez --- xlators/nfs/server/src/mount3.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'xlators/nfs/server') diff --git a/xlators/nfs/server/src/mount3.c b/xlators/nfs/server/src/mount3.c index 396809cb2c2..734453ca6a2 100644 --- a/xlators/nfs/server/src/mount3.c +++ b/xlators/nfs/server/src/mount3.c @@ -3205,6 +3205,12 @@ mnt3_export_parse_auth_param(struct mnt3_export *exp, char *exportpath) struct host_auth_spec *host = NULL; int ret = 0; + if (exportpath == NULL) { + gf_msg(GF_MNT, GF_LOG_ERROR, EINVAL, NFS_MSG_PARSE_HOSTSPEC_FAIL, + "Export path is NULL"); + return -1; + } + /* Using exportpath directly in strtok_r because we want * to strip off AUTH parameter from exportpath. */ token = strtok_r(exportpath, "(", &savPtr); -- cgit