From 2b8cc3353a3ca28843dc516f54751bef1f32f461 Mon Sep 17 00:00:00 2001 From: Packit Date: Oct 07 2020 15:42:18 +0000 Subject: Apply patch e2fsprogs-1.45.5-libext2fs-fix-bug-when-reading-or-writing-more-than-.patch patch_name: e2fsprogs-1.45.5-libext2fs-fix-bug-when-reading-or-writing-more-than-.patch present_in_specfile: true --- diff --git a/lib/ext2fs/unix_io.c b/lib/ext2fs/unix_io.c index 74fc8a7..628e60c 100644 --- a/lib/ext2fs/unix_io.c +++ b/lib/ext2fs/unix_io.c @@ -166,7 +166,7 @@ static errcode_t raw_read_blk(io_channel channel, unsigned char *buf = bufv; ssize_t really_read = 0; - size = (count < 0) ? -count : count * channel->block_size; + size = (count < 0) ? -count : (ext2_loff_t) count * channel->block_size; data->io_stats.bytes_read += size; location = ((ext2_loff_t) block * channel->block_size) + data->offset; @@ -275,7 +275,7 @@ static errcode_t raw_write_blk(io_channel channel, if (count < 0) size = -count; else - size = count * channel->block_size; + size = (ext2_loff_t) count * channel->block_size; } data->io_stats.bytes_written += size;