Skip to content

Conversation

@syonbori
Copy link

hello duairc.

i found a bug related to offset overflow today. so i checked fuse_lib.c, and found it.
( requesting over 2,147,483,647, 2^32-1, causes offset value to be negative value. )

type of the argument, off_t offset, is valid, but converting the value into Ruby's value causes this overflow.
INT2NUM(offset) --> LONG2NUM(offset)

on my environment, Fedora12@x86-64 and CentOS5@i686 can make successfully.
fixing this, i confirmed to works fine like this:
dd if=fuse/image.dat of=/dev/null bs=1M count=256, skip=2047
(without this fix, requesting to 2048th block causes overflow. fusefs calls raw_read with negative offset.)

PS: sorry for adding some emptyline diffs in this request... i think this is caused by emacs, but i don't know why this happend and how to stop it :-(

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant