On Thu, Nov 19, 2015 at 01:13:18AM -0700, Andreas Dilger wrote: > If ext2fs_punch() was called with "end = ~0ULL" to indicate truncate > to the end of file it tried to compute "count" for ext2fs_punch_ind() > based on "start" and "end", but incorrectly passed "count = ~0U" even > when "start" was non-zero, causing an overflow in some cases. > > The calling convention for ext2fs_punch_ind() was also gratuitously > different from ext2fs_punch() and ext2fs_punch_extent(), passing > "count" instead of "end" as the last parameter. Fix this by passing > it "end" like the other functions, and handle "count" internally. > > Add checks to ext2fs_punch_ind() if "end" is at or beyond the 2^32 > indirect block limit so the 32-bit internal variables don't overflow. > > Signed-off-by: Andreas Dilger <andreas.dilger@xxxxxxxxx> Thanks, applied. - Ted -- To unsubscribe from this list: send the line "unsubscribe linux-ext4" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html