Re: ext2fs: Validate file size when lengthening

2017-05-27 Thread Ted Unangst
Steven McDonald wrote: > Hi there, > > ext2fs currently has #if 0 around the size check for lengthening a > file. This allows ftruncate(2) calls for very large files to succeed, > but result in a smaller file than was requested. I noticed the problem > while trying to create vmd(8) images on an ex

ext2fs: Validate file size when lengthening

2017-05-27 Thread Steven McDonald
Hi there, ext2fs currently has #if 0 around the size check for lengthening a file. This allows ftruncate(2) calls for very large files to succeed, but result in a smaller file than was requested. I noticed the problem while trying to create vmd(8) images on an ext2fs filesystem. Below is a patch