Thanks to visit codestin.com
Credit goes to github.com

Skip to content

debug.c: Attempts to close stderr #226

@USSX-Hares

Description

@USSX-Hares

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

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