[PATCH 6.1 430/568] mtdchar: fix integer overflow in read/write ioctls