Skip to content

Error in dump function #1

@vian96

Description

@vian96

Hello! Thanks for such a nice code. I needed stack but I couldn't write mine.

BUT there is an error in your code!! When I try to dump empty stack (or try to check it) it causes segmentation fault trying to access data. If you want to try it by yourself run this code:

stack_t stack = {};

// tries to access data by NULL ptr at 447 line
ASSERT_OK (&stack);

So you should add something like if (stack->data) in your dump function.

Good luck solving this problem!

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