Hello,
I wanted to contribute to PL_MPEG by adding safety checks around ftell() calls.
As mentioned in the standard C library manual, ftell() returns -1 in case of error.
Right now, PL_MPEG doesn't check the return value and treats a potential -1 as a valid offset.
I would have checked for the return value and called exit(EXIT_FAILURE) when ftell() returns -1, but I don't know if calling exit() goes against this project's design philosophy.
Best regards.
Hello,
I wanted to contribute to PL_MPEG by adding safety checks around
ftell()calls.As mentioned in the standard C library manual,
ftell()returns-1in case of error.Right now, PL_MPEG doesn't check the return value and treats a potential
-1as a valid offset.I would have checked for the return value and called
exit(EXIT_FAILURE)whenftell()returns-1, but I don't know if callingexit()goes against this project's design philosophy.Best regards.