[PATCH 6.17 015/175] mtdchar: fix integer overflow in read/write ioctls