Date: Wed, 18 Oct 2017 08:18:01 +0000 (UTC) From: Baptiste Daroussin <bapt@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r324720 - stable/11/usr.sbin/ctld Message-ID: <201710180818.v9I8I1Be022687@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: bapt Date: Wed Oct 18 08:18:01 2017 New Revision: 324720 URL: https://svnweb.freebsd.org/changeset/base/324720 Log: MFC r324623: Fix ctld segfaulting when using ucl conf file format and having duplicated lun or target Submitted by: Nikita Kozlov <nikita.kozlov at blade-group.com> Sponsored by: blade Differential Revision: https://reviews.freebsd.org/D12646 Modified: stable/11/usr.sbin/ctld/uclparse.c Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.sbin/ctld/uclparse.c ============================================================================== --- stable/11/usr.sbin/ctld/uclparse.c Wed Oct 18 08:06:05 2017 (r324719) +++ stable/11/usr.sbin/ctld/uclparse.c Wed Oct 18 08:18:01 2017 (r324720) @@ -619,6 +619,8 @@ uclparse_target(const char *name, const ucl_object_t * const char *key; target = target_new(conf, name); + if (target == NULL) + return (1); while ((obj = ucl_iterate_object(top, &it, true))) { key = ucl_object_key(obj); @@ -807,6 +809,8 @@ uclparse_lun(const char *name, const ucl_object_t *top const char *key; lun = lun_new(conf, name); + if (lun == NULL) + return (1); while ((obj = ucl_iterate_object(top, &it, true))) { key = ucl_object_key(obj);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201710180818.v9I8I1Be022687>