Merge branch 'fix_safeop_wait' into 'stable-1.5'

add 0 terminator in ioctl

See merge request etherlab.org/ethercat!95
This commit is contained in:
Andreas Stewering-Bone 2023-11-23 17:27:37 +00:00
commit 2a68050c35
1 changed files with 1 additions and 0 deletions

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);