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

Uninitialised value in sep/extract.cpp #48

Open
TallFurryMan opened this issue Oct 27, 2020 · 2 comments
Open

Uninitialised value in sep/extract.cpp #48

TallFurryMan opened this issue Oct 27, 2020 · 2 comments

Comments

@TallFurryMan
Copy link

else if (newmarker == 'F')
{
ps = psstack[--pstop];
if ((cs == NONOBJECT) && (ps == COMPLETE))

There is a code path that uses psstack without initialising it after allocation. That initialisation should probably be done around line 317.

@TallFurryMan TallFurryMan changed the title Uninitialised value in sep/exctract.cpp Uninitialised value in sep/extract.cpp Oct 27, 2020
@knro
Copy link
Contributor

knro commented Nov 2, 2020

Initialize it how? by memset to 0 for example?

@TallFurryMan
Copy link
Author

This is implementation-dependent. The code uses an uninitialised value, so results are undefined.

That's not what we want, so I'm not sure I get your question. This said, I suspect this happens in edge cases where markers are not written in the right order in the file, so any initialisation value would work.

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

2 participants