Skip to content

Commit

Permalink
Merge tag 'upstream-4.5-rc7' of git://git.infradead.org/linux-ubifs
Browse files Browse the repository at this point in the history
Pull UBI fix from Richard Weinberger:
 "This contains a single bug fix for UBI"

* tag 'upstream-4.5-rc7' of git://git.infradead.org/linux-ubifs:
  ubi: Fix out of bounds write in volume update code
  • Loading branch information
Linus Torvalds committed Mar 6, 2016
2 parents 1306b04 + e4f6daa commit a58b9ad
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/mtd/ubi/upd.c
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ int ubi_start_leb_change(struct ubi_device *ubi, struct ubi_volume *vol,
vol->changing_leb = 1;
vol->ch_lnum = req->lnum;

vol->upd_buf = vmalloc(req->bytes);
vol->upd_buf = vmalloc(ALIGN((int)req->bytes, ubi->min_io_size));
if (!vol->upd_buf)
return -ENOMEM;

Expand Down

0 comments on commit a58b9ad

Please sign in to comment.