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 some undefined behavior #456

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

fix some undefined behavior #456

wants to merge 2 commits into from

Conversation

Korshikov
Copy link

I'm a member of the Pinguem.ru competition on finding errors in open source projects. A bug, found using PVS-Studio.
Errors:
compton/src/c2.c 600 err V774 The 'tstr' pointer was used after the memory was released.
Warning:
compton/src/common.h 1835 warn V575 The potential null pointer is passed into 'memcpy' function. Inspect the first argument.
compton/src/common.h 1836 warn V575 The potential null pointer is passed into 'memcpy' function. Inspect the first argument.
compton/src/common.h 1837 warn V575 The potential null pointer is passed into 'memcpy' function. Inspect the first argument.
compton/src/compton.c 7139 warn V575 The potential null pointer is passed into 'memcpy' function. Inspect the first argument.

Fix PVS warning:
    V575 The potential null pointer is passed into 'memcpy' function. Inspect the first argument.
PVS
V774 The 'tstr' pointer was used after the memory was released.
@Korshikov
Copy link
Author

One more error:
compton/src/opengl.c 1665 err V674 The '0.2' literal of the 'double' type is subtracted from a variable of the 'int' type. Consider inspecting the 'z -= 0.2' expression.
compton/src/opengl.c 1694 err V674 The '0.1' literal of the 'double' type is subtracted from a variable of the 'int' type. Consider inspecting the 'z -= 0.1' expression.

but I not understand what must be done in idea. So I can't fix it without understanding.

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

1 participant