Quote:
Originally Posted by ShivShubh
I will check again. But then I think why the same settings worked on a 500 MB file ? I was injecting 11 MB file on 500 MB file, it worked fine. Tried with same settings on 10 GB file, it was saying that 10 GB file (output) is empty. I was using strict mode.
|
In strict mode, output file must already have a size and range of bytes existing where you are writing. In other words, in default mode you can only
overwrite existing bytes. So of course it worked on 500mb file.
And it obviously cannot work on empty file size as it contain no bytes(to be overwritten), here you can only append new data into it, meaning growing its size and for that you need -nostrict mode.
Strict mode is meant to
write within output file boundaries. That is because it was designed for quickbms usage to write
same amount of data back(to
same offset) to get same file CRC as was original(before you zero it for example), here different size/crc would mean wrong data/corruption.
EDIT: My apology I misread you comment. You saying that file was not empty but 10gb size and there it did not worked correct? I will check it, but are you sure file was not in fact 0 bytes? And also offset+size where you wanted to write was within output files boundaries? Can you post more info or screenshots?
EDIT2: I believe you are correct, I did not tested myself but noticed that standard fseek function only have int as return value, this is certainly issue. I will change it using 64bit variant and that will solve problem. Update soon...