add 0 terminator in ioctl

This commit is contained in:
Bjarne von Horn
2023-11-23 18:13:24 +01:00
parent 349e73d89e
commit 267ae77ea2

View File

@@ -3050,6 +3050,7 @@ static ATTRIBUTES int ec_ioctl_sc_flag(
kfree(key);
return -EFAULT;
}
key[ioctl.key_size] = '\0';
if (down_interruptible(&master->master_sem)) {
kfree(key);