Skip to content
Snippets Groups Projects
Commit a58b9ada authored by Linus Torvalds's avatar Linus Torvalds
Browse files

Merge tag 'upstream-4.5-rc7' of git://git.infradead.org/linux-ubifs

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
parents 1306b047 e4f6daac
No related branches found
No related tags found
No related merge requests found
...@@ -193,7 +193,7 @@ int ubi_start_leb_change(struct ubi_device *ubi, struct ubi_volume *vol, ...@@ -193,7 +193,7 @@ int ubi_start_leb_change(struct ubi_device *ubi, struct ubi_volume *vol,
vol->changing_leb = 1; vol->changing_leb = 1;
vol->ch_lnum = req->lnum; 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) if (!vol->upd_buf)
return -ENOMEM; return -ENOMEM;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment