We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
In module alphamat: Usage of uninitialized Mat object leads to undefined behavior (segfault) in cm.cpp function lle
Memory allocation without initialization:
opencv_contrib/modules/alphamat/src/cm.cpp
Line 91 in e320d6a
First usage after declaration and allocation:
Line 93 in e320d6a
Next usage of uninitialized Mat object:
Line 126 in e320d6a
Change
Cones = 1;
I've tested the fix on 23 images and it works for me.
A look at the source code or a run of the example code in valgrind --track-origins=yes.
The text was updated successfully, but these errors were encountered:
/cc @sunitanyk
Sorry, something went wrong.
483b396
Successfully merging a pull request may close this issue.
System information (version)
Detailed description
In module alphamat: Usage of uninitialized Mat object leads to undefined behavior (segfault) in cm.cpp function lle
Memory allocation without initialization:
opencv_contrib/modules/alphamat/src/cm.cpp
Line 91 in e320d6a
First usage after declaration and allocation:
opencv_contrib/modules/alphamat/src/cm.cpp
Line 93 in e320d6a
Next usage of uninitialized Mat object:
opencv_contrib/modules/alphamat/src/cm.cpp
Line 126 in e320d6a
Probable solution
Change
opencv_contrib/modules/alphamat/src/cm.cpp
Line 93 in e320d6a
to
Cones = 1;
Remark
I've tested the fix on 23 images and it works for me.
Steps to reproduce
A look at the source code or a run of the example code in valgrind --track-origins=yes.
Issue submission checklist
answers.opencv.org, Stack Overflow, etc and have not found solution
The text was updated successfully, but these errors were encountered: