]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s3 onefs: Fix reading over the end of the array, because the incorrect array was...
authorTim Prouty <tprouty@samba.org>
Mon, 15 Jun 2009 20:16:07 +0000 (20:16 +0000)
committerTim Prouty <tprouty@samba.org>
Mon, 15 Jun 2009 21:11:39 +0000 (14:11 -0700)
source3/modules/onefs_config.c

index 6fe74fc15bc01e17c6bae7127ebf4b95c9b6d8ba..aa0d99e81a25d2c9f2dba7557616a52c0c1e5da1 100644 (file)
@@ -216,8 +216,9 @@ int onefs_load_config(connection_struct *conn)
 bool onefs_get_config(int snum, int config_type,
                      struct onefs_vfs_share_config *cfg)
 {
-       if (vfs_share_config[snum].init_flags & config_type)
-               *cfg = vfs_share_config[snum];
+       if ((pvfs_share_config != NULL) &&
+           (pvfs_share_config[snum].init_flags & config_type))
+               *cfg = pvfs_share_config[snum];
        else
                return false;