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

Fix segfault in objres #6

Closed
wants to merge 1 commit into from
Closed

Fix segfault in objres #6

wants to merge 1 commit into from

Conversation

PoroCYon
Copy link

objects[i].data wasn't initialized in all cases, causing the program to
pass a garbage (uninitialized) pointer to fwrite(3)

objects[i].data wasn't initialized in all cases, causing the program to
pass a garbage (uninitialized) pointer to fwrite(3)
@BR903
Copy link
Owner

BR903 commented Dec 29, 2018

Thanks! That's a bad bug on my part.

The correct fix, however, is just to set objects[i].data to NULL in that case. We don't want to store the object in memory if we don't need to.

@PoroCYon
Copy link
Author

Ah, oops, ok. Thanks.

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

Successfully merging this pull request may close these issues.

None yet

2 participants