From 1b50bd1aec24da815773990fa98a7990d24a652d Mon Sep 17 00:00:00 2001 From: dim Date: Tue, 19 Jan 2016 18:35:22 +0000 Subject: [PATCH] MFC r294102: MFV r294101: 6527 Possible access beyond end of string in zpool comment Reviewed by: George Wilson Reviewed by: Matthew Ahrens Reviewed by: Dan McDonald Approved by: Gordon Ross illumos/illumos-gate@2bd7a8d078223b122d65fea49bb8641f858b1409 This fixes erroneous double increments of the 'check' variable in a loop in spa_prop_validate(). I ran into this in the clang380-import branch, where clang 3.8.0 warns about it. (It is already fixed there.) git-svn-id: svn://svn.freebsd.org/base/stable/8@294334 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f --- sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c | 1 - 1 file changed, 1 deletion(-) diff --git a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c index 35ced0d64..4515c20a9 100644 --- a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c +++ b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c @@ -585,7 +585,6 @@ spa_prop_validate(spa_t *spa, nvlist_t *props) error = SET_ERROR(EINVAL); break; } - check++; } if (strlen(strval) > ZPROP_MAX_COMMENT) error = E2BIG; -- 2.45.0