Skip to content

Commit a58b9ad

Browse files
committed
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
2 parents 1306b04 + e4f6daa commit a58b9ad

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/mtd/ubi/upd.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ int ubi_start_leb_change(struct ubi_device *ubi, struct ubi_volume *vol,
193193
vol->changing_leb = 1;
194194
vol->ch_lnum = req->lnum;
195195

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

0 commit comments

Comments
 (0)