mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 10:41:38 -04:00
sched: Fix strncmp operation
One of the operands, buf, is incorrect, since it is stripped and the correct address for subsequent string comparing could change if leading white spaces, if any, are removed from buf. It is fixed by replacing buf with cmp. Signed-off-by: Hillf Danton <[email protected]> Signed-off-by: Peter Zijlstra <[email protected]> LKML-Reference: <[email protected]> Signed-off-by: Ingo Molnar <[email protected]>
This commit is contained in:
parent
1c5354de90
commit
524429c31b
1 changed files with 1 additions and 1 deletions
|
|
@ -741,7 +741,7 @@ sched_feat_write(struct file *filp, const char __user *ubuf,
|
|||
buf[cnt] = 0;
|
||||
cmp = strstrip(buf);
|
||||
|
||||
if (strncmp(buf, "NO_", 3) == 0) {
|
||||
if (strncmp(cmp, "NO_", 3) == 0) {
|
||||
neg = 1;
|
||||
cmp += 3;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue