mirror of
https://github.com/opnsense/src.git
synced 2026-05-28 04:12:45 -04:00
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
1 changed files with 6 additions and 0 deletions
|
|
@ -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 a new issue