On Fri, Oct 19, 2007 at 01:39:38PM +0200, Stefan Krah wrote: > in getsize() the BLKGETSIZE and BLKGETSIZE64 ioctls are called > with signed args, see the patch below. Ah.. I've already fixed this bug in other place in blockdev (--getsize, --getsize64). I see same signed args in fdisk/disksize.c :-( We need to cleanup this code, remove all getsize() versions and create libs/blkdevsize.c (see TODO). > Since the EFBIG change in getsize() sz might contain garbage, so there > should be additional error checks, something like (yes, this is ugly): I think you needn't extra check, you can zeroize "sz" when the first ioctl() returns an error. Karel -- Karel Zak <kzak@xxxxxxxxxx> - To unsubscribe from this list: send the line "unsubscribe util-linux-ng" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html