diff options
| author | huijin.park <[email protected]> | 2018-11-28 03:02:14 -0500 |
|---|---|---|
| committer | Boris Brezillon <[email protected]> | 2018-12-10 21:59:07 +0100 |
| commit | 84a1c2109d23df3543d96231c4fee1757299bb1a (patch) | |
| tree | e025f78f761dd94e0a503ab52437e1c4b6f9b65d /drivers/platform/surface/aggregator/ssh_parser.c | |
| parent | 4cc106f8f245bae0c458224804733240cb22394d (diff) | |
mtd: spi-nor: cast to u64 to avoid uint overflows
The "params->size" is defined as "u64".
And "info->sector_size" and "info->n_sectors" are defined as
unsigned int and u16.
Thus, u64 data might have strange data(loss data) if the result
overflows an unsigned int.
This patch casts "info->sector_size" to an u64.
Signed-off-by: huijin.park <[email protected]>
Reviewed-by: Geert Uytterhoeven <[email protected]>
Signed-off-by: Boris Brezillon <[email protected]>
Diffstat (limited to 'drivers/platform/surface/aggregator/ssh_parser.c')
0 files changed, 0 insertions, 0 deletions