From 3e8a8fad59cfdd053ad96afc39ea7d6e98b91764 Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Fri, 22 Apr 2011 09:39:37 +0200 Subject: s3: Fix Coverity ID 2307, NULL_RETURNS --- source3/lib/sysquotas_nfs.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/source3/lib/sysquotas_nfs.c b/source3/lib/sysquotas_nfs.c index 8272f53e3c..eff5874db6 100644 --- a/source3/lib/sysquotas_nfs.c +++ b/source3/lib/sysquotas_nfs.c @@ -134,6 +134,10 @@ int sys_get_nfs_quota(const char *path, const char *bdev, memset(cutstr, '\0', len+1); host = strncat(cutstr, mnttype, sizeof(char) * len); testpath = strchr_m(mnttype, ':'); + if (testpath == NULL) { + errno = EINVAL; + goto out; + } testpath++; gq_args.gqa_pathp = testpath; gq_args.gqa_uid = id.uid; -- cgit