sdt: start checking version field when parsing probe definitions
This is an extra safety measure. MFC after: 21 days
This commit is contained in:
parent
c9d71814d5
commit
09999d92b1
@ -141,6 +141,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;
|
||||
|
Loading…
Reference in New Issue
Block a user