diff options
Diffstat (limited to 'src/libimcv/ita/ita_attr_command.c')
-rw-r--r-- | src/libimcv/ita/ita_attr_command.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/libimcv/ita/ita_attr_command.c b/src/libimcv/ita/ita_attr_command.c index a1f1dd0cf..85beb49cb 100644 --- a/src/libimcv/ita/ita_attr_command.c +++ b/src/libimcv/ita/ita_attr_command.c @@ -96,9 +96,7 @@ METHOD(pa_tnc_attr_t, build, void, METHOD(pa_tnc_attr_t, process, status_t, private_ita_attr_command_t *this, u_int32_t *offset) { - this->command = malloc(this->value.len + 1); - memcpy(this->command, this->value.ptr, this->value.len); - this->command[this->value.len] = '\0'; + this->command = strndup(this->value.ptr, this->value.len); return SUCCESS; } |