Hello! > There is no guarantee that sf->sffd is a FILE* . Again, this is exposed via > our API. sf->sffd is a void*, which could be some user defined handle, which, > when passing to fseek(), would result in an access violation and in a > horrible, possibly-hard-to-reproduce crash of the entire application.
Yes, I know ;) As I have written, the function was a test that I made with traditional fseek/ftell, because I did an experiment for detecting the size of a file larger than 2 GiB, by using only C89/C90 functions. That example function surely needs to be improved: since you confirmed that the limit of the size is 4GiB, it is required to count the number of hops and if they are more than 3, it should return an error, but actually it depends if it is a good idea or not. Sincerely. Carlo Bramini. _______________________________________________ fluid-dev mailing list fluid-dev@nongnu.org https://lists.nongnu.org/mailman/listinfo/fluid-dev