Ensure that the DOF string length is divisible by 2.
It is an ASCII encoding of a hexadecimal representation of the DOF file used to enable anonymous tracing, so its length should always be even. MFC after: 1 week
This commit is contained in:
parent
35bf9feb41
commit
9613442e83
@ -13346,8 +13346,11 @@ dtrace_dof_property(const char *name)
|
||||
|
||||
data += strlen(name) + 1; /* skip past the '=' */
|
||||
len = eol - data;
|
||||
if (len % 2 != 0) {
|
||||
dtrace_dof_error(NULL, "invalid DOF encoding length");
|
||||
goto doferr;
|
||||
}
|
||||
bytes = len / 2;
|
||||
|
||||
if (bytes < sizeof(dof_hdr_t)) {
|
||||
dtrace_dof_error(NULL, "truncated header");
|
||||
goto doferr;
|
||||
|
Loading…
x
Reference in New Issue
Block a user