vasi / squashfuse

FUSE filesystem to mount squashfs archives
Other
291 stars 66 forks source link

Fix scan format for offset option #22

Closed zeldin closed 6 years ago

zeldin commented 7 years ago

The offset field in sqfs_opts has type size_t, so the scanf string needs to be %zu instead of %u, or the field length might mismatch.

Note that %zu is C99; an alternate solution would be to keep %u and change the type of the field to "unsigned" instead. (Or use "%lu" and make the field "unsigned long".)

chipturner commented 6 years ago

Thanks for the fix!