Skip to content

Commit

Permalink
fixed from PVS-Studio:
Browse files Browse the repository at this point in the history
V575 The number of processed elements should be passed to the 'GetWindowTextW' function as the third argument instead of buffer's size in bytes. dockingdlginterface.h 44
V773 Visibility scope of the 'nPtr' pointer was exited without releasing the memory. A memory leak is possible. globals.cpp 100
  • Loading branch information
ip-gpu committed Oct 30, 2017
1 parent 83d3d1b commit 60a98a5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion DockingFeature/DockingDlgInterface.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ class DockingDlgInterface : public StaticDialog

void create(tTbData * data, bool isRTL = false){
StaticDialog::create(_dlgID, isRTL);
::GetWindowText(_hSelf, _pluginName, sizeof(_pluginName));
::GetWindowText(_hSelf, _pluginName, sizeof(_pluginName)/sizeof(TCHAR));

// user information
data->hClient = _hSelf;
Expand Down
2 changes: 2 additions & 0 deletions globals.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,8 @@ wstring GetPythonPath() {
pythonInstalled = true;
break;
}

delete[] nPtr;
} while (FindNextFile(h, &data));
}

Expand Down

0 comments on commit 60a98a5

Please sign in to comment.