Initialize interval value to 0.
From: Gerald Schaefer <[email protected]>
[S390] Initialize interval value to 0.
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]>
---
arch/s390/appldata/appldata_base.c | 1 + 1 files changed, 1 insertion(+)
arch/s390/appldata/appldata_base.c +1 -0
@@ -310,6 +310,7 @@ appldata_interval_handler(ctl_table *ctlif (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" );