On Wed, December 20, 2006 11:32, Rob Walker said:
>> >I can reproduce the bug using the cryptsetup from unstable.  I've also
>> > tried it on another machine with the same results.
>>
>> Ok, could you then provide me with the exact steps that you took to
>> reproduce it cause so far I haven't managed to do so.
>
>
> I think I've found the problem.  In lib/utils.c, the sector_size function
> is
> this:
>
> static int sector_size(int fd)
> {
>       int bsize;
>       ioctl(fd,BLKSSZGET, &bsize);
>       return bsize;
> }
>
>
> For a file, the ioctl will fail.  Since bsize is not initialized, it's
> value will be random

Thanks, a self-fixing bug report is always nice :)

The patch looks sane, unfortunately I'm leaving for a two-week vacation in
about two hours. Hopefully Jonas will have time to add this fix and
release a new version.

Later it would probably be good to add checks too make sure that the
device argument is a block device and not something else, in order to
provide more helpful messages to the user. That can be implemented later
though.

-- 
David Härdeman



-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to