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

fixed from PVS-Studio #8

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

fixed from PVS-Studio #8

wants to merge 1 commit into from

Conversation

ip-gpu
Copy link

@ip-gpu ip-gpu commented Oct 30, 2017

I'm a member of the Pinguem.ru competition on finding errors in open source projects. A bug, found using PVS-Studio. Warnings:

V542 Consider inspecting an odd type cast: 'wchar_t *' to 'char *'. application.cpp 101

m_coeffs changed size to [SPLINE_POINTS][4];
V557 Array overrun is possible. The 'n' index is pointing beyond array bound. spline.h 27
V557 Array overrun is possible. The value of 'i' index could reach 15. spline.h 37
V557 Array overrun is possible. The value of 'j + 1' index could reach 15. spline.h 41
V557 Array overrun is possible. The value of 'j + 1' index could reach 15. spline.h 42
V557 Array overrun is possible. The 'ArcLengthIntegrandSingleSpline' function processes value '15'. Inspect the first argument. Check lines: 78, 92. spline.h 78

V575 The potential null pointer is passed into 'memset' function. Inspect the first argument. image_read.cpp 3495
V592 The expression was enclosed by parentheses twice: ((expression)). One pair of parentheses is unnecessary or misprint is present. spline.h 18
V728 An excessive check can be simplified. The '(A && !B) || (!A && B)' expression is equivalent to the 'bool(A) != bool(B)' expression. tga.c 309
V773 The function was exited without releasing the 'hFind' handle. A resource leak is possible. platform_win32.cpp 166, 185V773 The function was exited without releasing the 'tga_data' pointer. A memory leak is possible. image_read.cpp 2970

V542 Consider inspecting an odd type cast: 'wchar_t *' to 'char *'. application.cpp 101

m_coeffs changed size to [SPLINE_POINTS][4];
V557 Array overrun is possible. The 'n' index is pointing beyond array bound. spline.h 27
V557 Array overrun is possible. The value of 'i' index could reach 15. spline.h 37
V557 Array overrun is possible. The value of 'j + 1' index could reach 15. spline.h 41
V557 Array overrun is possible. The value of 'j + 1' index could reach 15. spline.h 42
V557 Array overrun is possible. The 'ArcLengthIntegrandSingleSpline' function processes value '15'. Inspect the first argument. Check lines: 78, 92. spline.h 78

V575 The potential null pointer is passed into 'memset' function. Inspect the first argument. image_read.cpp 3495
V592 The expression was enclosed by parentheses twice: ((expression)). One pair of parentheses is unnecessary or misprint is present. spline.h 18
V728 An excessive check can be simplified. The '(A && !B) || (!A && B)' expression is equivalent to the 'bool(A) != bool(B)' expression. tga.c 309
V773 The function was exited without releasing the 'hFind' handle. A resource leak is possible. platform_win32.cpp 166, 185V773 The function was exited without releasing the 'tga_data' pointer. A memory leak is possible. image_read.cpp 2970
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.

1 participant