svn commit: r289803 - stable/10/sys/cddl/dev/sdt
Andriy Gapon
avg at FreeBSD.org
Fri Oct 23 07:57:23 UTC 2015
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;
More information about the svn-src-stable-10
mailing list