|TIFF and LibTiff Mail List Archive|
LibTiff Mailing List
2018.12.13 11:04 "Re: [Tiff] SeekOK and WriteOK", by Emmanuel Cosnard
I found out what the problem was: the buffer size I gave in input of the WriteOK was larger than the actual size of the buffer.
What I don't understand is how libtiff does to not crash, but only sometimes return an error (-1), and sometimes, writing the data of the buffer anyway. Do you have any explanation?
Thank you for your help and regards,
De: Emmanuel Cosnard
I actually noticed that I never get any problem with the SeekOK, but only with writeOK.
I sometimes returns -1 although he wrote everything I wanted to, and sometimes returns -1 and doesn't write anything but I have no clue why on some occasions he doesn't write...
On Tue, 11 Dec 2018, Nicolas RUFF wrote:
> This might be by design of the API :)
One approach is to call 'lseek(fd,SEEK_CUR)' and verify that the