Make sure classifier string is null terminated
Signed-off-by: Adam Rutkowski <adam.j.rutkowski@intel.com>
This commit is contained in:
parent
531c7856bd
commit
5bcba78e7f
@ -203,6 +203,10 @@ static int _cas_cls_string_ctr(struct cas_classifier *cls,
|
||||
CAS_CLS_MSG(KERN_ERR, "String specifier is empty\n");
|
||||
return -EINVAL;
|
||||
}
|
||||
if (len == MAX_STRING_SPECIFIER_LEN) {
|
||||
CAS_CLS_MSG(KERN_ERR, "String specifier is too long\n");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
ctx = kmalloc(sizeof(*ctx), GFP_KERNEL);
|
||||
if (!ctx)
|
||||
|
Loading…
Reference in New Issue
Block a user