summaryrefslogtreecommitdiffstats
path: root/Documentation
diff options
context:
space:
mode:
authorRoberto Sassu2014-10-13 14:08:40 +0200
committerMimi Zohar2014-10-13 14:39:01 +0200
commit9f3166b8ca3b89c27b9f1c9039d3662ab7812cfa (patch)
tree8477845f161e24a8833f9436430cd20a7e34dae9 /Documentation
parentima: display template format in meas. list if template name length is zero (diff)
downloadkernel-qcow2-linux-9f3166b8ca3b89c27b9f1c9039d3662ab7812cfa.tar.gz
kernel-qcow2-linux-9f3166b8ca3b89c27b9f1c9039d3662ab7812cfa.tar.xz
kernel-qcow2-linux-9f3166b8ca3b89c27b9f1c9039d3662ab7812cfa.zip
ima: don't allocate a copy of template_fmt in template_desc_init_fields()
This patch removes the allocation of a copy of 'template_fmt', needed for iterating over all fields in the passed template format string. The removal was possible by replacing strcspn(), which modifies the passed string, with strchrnul(). The currently processed template field is copied in a temporary variable. The purpose of this change is use template_desc_init_fields() in two ways: for just validating a template format string (the function should work if called by a setup function, when memory cannot be allocated), and for actually initializing a template descriptor. The implementation of this feature will be complete with the next patch. Changelog: - v3: - added 'goto out' in template_desc_init_fields() to free allocated memory if a template field length is not valid (suggested by Mimi Zohar) Signed-off-by: Roberto Sassu <roberto.sassu@polito.it> Signed-off-by: Mimi Zohar <zohar@linux.vnet.ibm.com>
Diffstat (limited to 'Documentation')
0 files changed, 0 insertions, 0 deletions