diff options
author | avg <avg@FreeBSD.org> | 2015-10-23 07:57:21 +0000 |
---|---|---|
committer | avg <avg@FreeBSD.org> | 2015-10-23 07:57:21 +0000 |
commit | e98221a3c3f53f33d609b0b8caed83d08a28e377 (patch) | |
tree | 2da87ec56d16612832780a73b8948452141eb481 /sys/cddl | |
parent | faf581f88bb33747ab100e1fbb9094831cd5796a (diff) | |
download | FreeBSD-src-e98221a3c3f53f33d609b0b8caed83d08a28e377.zip FreeBSD-src-e98221a3c3f53f33d609b0b8caed83d08a28e377.tar.gz |
MFC r288362: sdt: start checking version field when parsing probe definitions
Diffstat (limited to 'sys/cddl')
-rw-r--r-- | sys/cddl/dev/sdt/sdt.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/sys/cddl/dev/sdt/sdt.c b/sys/cddl/dev/sdt/sdt.c index 34162e1..cf7b532 100644 --- a/sys/cddl/dev/sdt/sdt.c +++ b/sys/cddl/dev/sdt/sdt.c @@ -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; |