Hi all,

gznbd works incorrectly with large size argument which overflows 4-byte integer.

For example:
gznbd /dev/nbd0 /root/test.gz 1000204886016
gznbd: 1000204886016 does not appear to be a valid size

The size is stored in u64, but is converted from string using atol().
I've attached the patch to replace atol() with atoll().
As the source is compiled with -std=gnu99, there must be no problem with 
atoll().

-- 
Andrey Hippo.

Attachment: nbd-atol-u64.patch
Description: Binary data

------------------------------------------------------------------------------
Got Input?   Slashdot Needs You.
Take our quick survey online.  Come on, we don't ask for help often.
Plus, you'll get a chance to win $100 to spend on ThinkGeek.
http://p.sf.net/sfu/slashdot-survey
_______________________________________________
Nbd-general mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/nbd-general

Reply via email to