I'm trying to download a file which has a content-length of 2608578106 bytes (2.4 GB). When I try using snarf, I get
warning: you already have all of `indiegamethemovie-1080p-1356475247.zip', skipping
even though the local file, indiegamethemovie-1080p-1356475247.zip is empty. I believe this to be due to line 427 on http.c, which says
rsrc->outfile_size = (off_t )atoi(len_string);
I tried this line in a standalone program, as follows:
printf("%ld\n", (off_t)atoi("2608578106"));
This prints out -1686389190. I believe this is causing the condition on line 157 of file util.c to become true because the size of the file is negative.
It seems like you ought to be able to trivially fix this using atol or strtol, but in my brief testing it seemed like these returned ints and not longs. Maybe I have the compiler flags wrong or something.
Hi!
I'm trying to download a file which has a content-length of 2608578106 bytes (2.4 GB). When I try using snarf, I get
even though the local file, indiegamethemovie-1080p-1356475247.zip is empty. I believe this to be due to line 427 on http.c, which says
I tried this line in a standalone program, as follows:
This prints out -1686389190. I believe this is causing the condition on line 157 of file util.c to become true because the size of the file is negative.
It seems like you ought to be able to trivially fix this using atol or strtol, but in my brief testing it seemed like these returned ints and not longs. Maybe I have the compiler flags wrong or something.
Thanks for your time!