]> granicus.if.org Git - zfs/commitdiff
Illumos 6527 - Possible access beyond end of string in zpool comment
authorJorgen Lundman <lundman@lundman.net>
Wed, 27 Jan 2016 02:02:04 +0000 (18:02 -0800)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Thu, 28 Jan 2016 17:46:04 +0000 (12:46 -0500)
6527 Possible access beyond end of string in zpool comment
Reviewed by: George Wilson <george.wilson@delphix.com>
Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Reviewed by: Dan McDonald <danmcd@omniti.com>
Approved by: Gordon Ross <gwr@nexenta.com>

References:
  https://www.illumos.org/issues/6527
  https://github.com/illumos/illumos-gate/commit/2bd7a8d

Ported-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Chunwei Chen <tuxoko@gmail.com>
module/zfs/spa.c

index ea4eb9f9a8200ce01ade36de1a633af1fcc9642c..34a317fbed3ad0a7ecdaad5938ecbabb661a4795 100644 (file)
@@ -588,7 +588,6 @@ spa_prop_validate(spa_t *spa, nvlist_t *props)
                                        error = SET_ERROR(EINVAL);
                                        break;
                                }
-                               check++;
                        }
                        if (strlen(strval) > ZPROP_MAX_COMMENT)
                                error = SET_ERROR(E2BIG);