Skip to content

How to handle ftell() failure? #72

Description

@malespiaut

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions