diff options
| author | Rafael J. Wysocki <[email protected]> | 2015-10-09 22:13:30 +0200 | 
|---|---|---|
| committer | Rafael J. Wysocki <[email protected]> | 2015-10-09 22:13:30 +0200 | 
| commit | 670aee3fc7ac37ae947f8b582d87b51d5fa36524 (patch) | |
| tree | 9885998483d4506208e5aef9c13c8a86adea20bb /drivers/mtd/ubi/io.c | |
| parent | d61e87ac53292a3138b4354b687558973686b6ca (diff) | |
| parent | 55582bccdc1e89ecc973c260d46e247df675d4df (diff) | |
Merge branches 'pm-devfreq' and 'pm-cpufreq'
* pm-devfreq:
  PM / devfreq: fix double kfree
  PM / devfreq: Fix governor_store()
* pm-cpufreq:
  cpufreq: prevent lockup on reading scaling_available_frequencies
  cpufreq: acpi_cpufreq: prevent crash on reading freqdomain_cpus
Diffstat (limited to 'drivers/mtd/ubi/io.c')
| -rw-r--r-- | drivers/mtd/ubi/io.c | 5 | 
1 files changed, 5 insertions, 0 deletions
| diff --git a/drivers/mtd/ubi/io.c b/drivers/mtd/ubi/io.c index 5bbd1f094f4e..1fc23e48fe8e 100644 --- a/drivers/mtd/ubi/io.c +++ b/drivers/mtd/ubi/io.c @@ -926,6 +926,11 @@ static int validate_vid_hdr(const struct ubi_device *ubi,  		goto bad;  	} +	if (data_size > ubi->leb_size) { +		ubi_err(ubi, "bad data_size"); +		goto bad; +	} +  	if (vol_type == UBI_VID_STATIC) {  		/*  		 * Although from high-level point of view static volumes may |