Skip to content

Commit

Permalink
[S390] Initialize interval value to 0.
Browse files Browse the repository at this point in the history
sscanf() could leave the interval value unchanged in which case it
would be used uninitialized.

Signed-off-by: Gerald Schaefer <[email protected]>
Signed-off-by: Martin Schwidefsky <[email protected]>
  • Loading branch information
Gerald Schaefer authored and Martin Schwidefsky committed Oct 27, 2006
1 parent f488039 commit 95425f1
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions arch/s390/appldata/appldata_base.c
Original file line number Diff line number Diff line change
Expand Up @@ -310,6 +310,7 @@ appldata_interval_handler(ctl_table *ctl, int write, struct file *filp,
if (copy_from_user(buf, buffer, len > sizeof(buf) ? sizeof(buf) : len)) {
return -EFAULT;
}
interval = 0;
sscanf(buf, "%i", &interval);
if (interval <= 0) {
P_ERROR("Timer CPU interval has to be > 0!\n");
Expand Down

0 comments on commit 95425f1

Please sign in to comment.