Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

debug.c: Attempts to close stderr #226

Open
USSX-Hares opened this issue Jan 26, 2025 · 0 comments
Open

debug.c: Attempts to close stderr #226

USSX-Hares opened this issue Jan 26, 2025 · 0 comments

Comments

@USSX-Hares
Copy link

https://github.com/jleffler/soq/blob/bb84e0704fb66a558fbcf507f43e76a7a547930e/src/libsoq/debug.c#L57C1-L59C1

        if (debugfp != stdin && debugfp != stdout && debugfp != stderr)
            fclose(debugfp);
        debugfp = dbfp;

In main:

    db_setfileptr(stderr);

Here, debugfp is initialized with 0 and then is attempted to close in db_setfileptr, leading to SEGFAULT

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant