diff options
author | Volker Lendecke <vl@samba.org> | 2011-04-22 09:39:37 +0200 |
---|---|---|
committer | Volker Lendecke <vl@samba.org> | 2011-04-22 10:06:35 +0200 |
commit | 3e8a8fad59cfdd053ad96afc39ea7d6e98b91764 (patch) | |
tree | 17873546935499449329b8059b1064f8aaa4ece7 | |
parent | 9a0676d5c947033ac41f700be9ba92ab1666814e (diff) | |
download | samba-3e8a8fad59cfdd053ad96afc39ea7d6e98b91764.tar.gz samba-3e8a8fad59cfdd053ad96afc39ea7d6e98b91764.tar.bz2 samba-3e8a8fad59cfdd053ad96afc39ea7d6e98b91764.zip |
s3: Fix Coverity ID 2307, NULL_RETURNS
-rw-r--r-- | source3/lib/sysquotas_nfs.c | 4 |
1 files changed, 4 insertions, 0 deletions
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; |