Date: Fri, 23 Oct 2015 07:57:22 +0000 (UTC) From: Andriy Gapon <avg@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r289803 - stable/10/sys/cddl/dev/sdt Message-ID: <201510230757.t9N7vMLB076956@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: avg Date: Fri Oct 23 07:57:21 2015 New Revision: 289803 URL: https://svnweb.freebsd.org/changeset/base/289803 Log: MFC r288362: sdt: start checking version field when parsing probe definitions Modified: stable/10/sys/cddl/dev/sdt/sdt.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cddl/dev/sdt/sdt.c ============================================================================== --- stable/10/sys/cddl/dev/sdt/sdt.c Fri Oct 23 07:48:40 2015 (r289802) +++ stable/10/sys/cddl/dev/sdt/sdt.c Fri Oct 23 07:57:21 2015 (r289803) @@ -142,6 +142,12 @@ sdt_create_probe(struct sdt_probe *probe char *to; size_t len; + if (probe->version != (int)sizeof(*probe)) { + printf("ignoring probe %p, version %u expected %u\n", + probe, probe->version, (int)sizeof(*probe)); + return; + } + TAILQ_FOREACH(prov, &sdt_prov_list, prov_entry) if (strcmp(prov->name, probe->prov->name) == 0) break;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201510230757.t9N7vMLB076956>