Re: NAK: [PATCH][mtd-next] mtd: sharpslpart: fix overflow on block_adr calculation

2017-11-08 Thread Richard Weinberger
Colin, Am Mittwoch, 8. November 2017, 16:57:57 CET schrieb Colin Ian King: > On 08/11/17 15:46, Colin King wrote: > > From: Colin Ian King > > > > Multiplying block_num and mtd->erasesize may potentially overflow > > as they are both unsigned ints and so the multiplication is evaluated > > in un

NAK: [PATCH][mtd-next] mtd: sharpslpart: fix overflow on block_adr calculation

2017-11-08 Thread Colin Ian King
On 08/11/17 15:46, Colin King wrote: > From: Colin Ian King > > Multiplying block_num and mtd->erasesize may potentially overflow > as they are both unsigned ints and so the multiplication is evaluated > in unsigned int arithmetic . Cast block_adr to off_t to ensure > multiplication is off_t siz