PVS-Studio Analysis Results

Source code:PtokaX-svn-r155
Date:03/17/18 21:37:56
PVS-Studio Version:6.22.25373.921
Total Warnings (GA):132
Total Warnings (OP):1
Total Warnings (64):11
Group Location Level Code Message
64-bit errors globaldataqueue.cpp:332 High V220 Suspicious sequence of types castings: memsize -> 32-bit integer -> memsize. The value being cast: '(szAllignLen - 1)'.
64-bit errors globaldataqueue.cpp:372 High V220 Suspicious sequence of types castings: memsize -> 32-bit integer -> memsize. The value being cast: '(szAllignLen - 1)'.
64-bit errors user.cpp:1295 High V220 Suspicious sequence of types castings: memsize -> 32-bit integer -> memsize. The value being cast: 'szTxtLen'.
64-bit errors utility.cpp:1238 High V114 Dangerous explicit type pointer conversion: (LPDWORD) & szStringBufSize
64-bit errors exceptionhandling.cpp:98 Medium V119 More than one sizeof() operator is used in one expression.
64-bit errors user.cpp:314 Medium V127 An overflow of the 32-bit 'reqVals' variable is possible inside a long cycle which utilizes a memsize-type loop counter.
64-bit errors user.cpp:346 Medium V127 An overflow of the 32-bit 'reqVals' variable is possible inside a long cycle which utilizes a memsize-type loop counter.
64-bit errors user.cpp:393 Medium V127 An overflow of the 32-bit 'reqVals' variable is possible inside a long cycle which utilizes a memsize-type loop counter.
64-bit errors user.cpp:400 Medium V127 An overflow of the 32-bit 'reqVals' variable is possible inside a long cycle which utilizes a memsize-type loop counter.
64-bit errors user.cpp:423 Medium V127 An overflow of the 32-bit 'reqVals' variable is possible inside a long cycle which utilizes a memsize-type loop counter.
64-bit errors utility.cpp:590 Medium V127 An overflow of the 32-bit 'h' variable is possible inside a long cycle which utilizes a memsize-type loop counter.
General Analysis luacorelib.cpp:2542 High V547 Expression 'ui32DataToChange == 9' is always true.
General Analysis serverthread.cpp:412 High V512 A call of the 'memcpy' function will lead to underflow of the buffer 'ui128IpHash'.
General Analysis serviceloop.cpp:90 High V730 Not all members of a class are initialized inside the constructor. Consider inspecting: m_Addr.
General Analysis settingmanager.cpp:553 High V528 It is odd that pointer to 'char' type is compared with the '\0' value. Probably meant: *SetTxtCom[szi] != '\0'.
General Analysis settingmanager.cpp:530 High V528 It is odd that pointer to 'char' type is compared with the '\0' value. Probably meant: *SetShortCom[szi] != '\0'.
General Analysis settingmanager.cpp:507 High V528 It is odd that pointer to 'char' type is compared with the '\0' value. Probably meant: *SetBoolCom[szi] != '\0'.
General Analysis bandialog.cpp:691 High V595 The 'sNick' pointer was utilized before it was verified against nullptr. Check lines: 691, 716.
General Analysis bandialog.cpp:754 High V595 The 'sReason' pointer was utilized before it was verified against nullptr. Check lines: 754, 772.
General Analysis bandialog.cpp:793 High V595 The 'sBy' pointer was utilized before it was verified against nullptr. Check lines: 793, 810.
General Analysis bansdialog.cpp:656 High V773 Visibility scope of the 'pBanDialog' pointer was exited without releasing the memory. A memory leak is possible.
General Analysis bansdialog.cpp:166 High V773 The function was exited without releasing the 'pBanDialog' pointer. A memory leak is possible.
General Analysis bansdialog.cpp:92 High V773 The function was exited without releasing the 'pBanDialog' pointer. A memory leak is possible.
General Analysis mainwindow.cpp:417 High V773 The function was exited without releasing the 'pAboutDlg' pointer. A memory leak is possible.
General Analysis mainwindowpagescripts.cpp:429 High V773 Visibility scope of the 'pScriptEditorDialog' pointer was exited without releasing the memory. A memory leak is possible.
General Analysis mainwindowpagestats.cpp:312 High V773 Visibility scope of the 'pMassMsgDlg' pointer was exited without releasing the memory. A memory leak is possible.
General Analysis mainwindowpagestats.cpp:294 High V773 The function was exited without releasing the 'sMSG' handle. A resource leak is possible.
General Analysis mainwindowpagestats.cpp:281 High V773 Visibility scope of the 'pRedirectAllDlg' pointer was exited without releasing the memory. A memory leak is possible.
General Analysis mainwindowpagestats.cpp:250 High V773 The function was exited without releasing the 'sMSG' handle. A resource leak is possible.
General Analysis mainwindowpageuserschat.cpp:300 High V646 Consider inspecting the application's logic. It's possible that 'else' keyword is missing.
General Analysis mainwindowpageuserschat.cpp:791 High V773 Visibility scope of the 'pRedirectDlg' pointer was exited without releasing the memory. A memory leak is possible.
General Analysis mainwindowpageuserschat.cpp:748 High V773 Visibility scope of the 'pBanDlg' pointer was exited without releasing the memory. A memory leak is possible.
General Analysis mainwindowpageuserschat.cpp:693 High V773 Visibility scope of the 'pKickDlg' pointer was exited without releasing the memory. A memory leak is possible.
General Analysis profilesdialog.cpp:524 High V773 Visibility scope of the 'pRenameProfileDlg' pointer was exited without releasing the memory. A memory leak is possible.
General Analysis profilesdialog.cpp:112 High V773 The function was exited without releasing the 'pNewProfileDlg' pointer. A memory leak is possible.
General Analysis rangebandialog.cpp:514 High V595 The 'sBy' pointer was utilized before it was verified against nullptr. Check lines: 514, 531.
General Analysis rangebandialog.cpp:475 High V595 The 'sReason' pointer was utilized before it was verified against nullptr. Check lines: 475, 493.
General Analysis rangebansdialog.cpp:93 High V773 The function was exited without releasing the 'pRangeBanDialog' pointer. A memory leak is possible.
General Analysis rangebansdialog.cpp:168 High V773 The function was exited without releasing the 'pRangeBanDialog' pointer. A memory leak is possible.
General Analysis rangebansdialog.cpp:620 High V773 Visibility scope of the 'pRangeBanDialog' pointer was exited without releasing the memory. A memory leak is possible.
General Analysis db-sqlite.cpp:428 Medium V547 Expression 'szLength > 0' is always true.
General Analysis db-sqlite.cpp:412 Medium V547 Expression 'szLength > 0' is always true.
General Analysis db-sqlite.cpp:396 Medium V547 Expression 'szLength > 0' is always true.
General Analysis db-sqlite.cpp:380 Medium V547 Expression 'szLength > 0' is always true.
General Analysis db-sqlite.cpp:463 Medium V686 After evaluation of the left operand of the '||' operator , the right expression 'szLength > 39' is excessive, or the expression contains a logical error.
General Analysis db-sqlite.cpp:457 Medium V686 After evaluation of the left operand of the '||' operator , the right expression 'szLength > 64' is excessive, or the expression contains a logical error.
General Analysis hubcommands.cpp:818 Medium V1004 The 'sCmdParts[1]' pointer was used unsafely after it was verified against nullptr. Check lines: 796, 818.
General Analysis hubcommands.cpp:1107 Medium V1004 The 'sCmdParts[2]' pointer was used unsafely after it was verified against nullptr. Check lines: 1068, 1107.
General Analysis hubcommands-iq.cpp:270 Medium V1004 The 'sCmdParts[1]' pointer was used unsafely after it was verified against nullptr. Check lines: 222, 270.
General Analysis luascript.cpp:140 Medium V538 The line contains control character 0x0B (vertical tabulation).
General Analysis pxstring.cpp:306 Medium V794 The assignment operator should be protected from the case of 'this == &sStr'.
General Analysis servermanager.cpp:1065 Medium V618 It's dangerous to call the 'printf' function in such a manner, as the line being passed could contain format specification. The example of the safe code: printf("%s", str);
General Analysis servermanager.cpp:1081 Medium V618 It's dangerous to call the 'printf' function in such a manner, as the line being passed could contain format specification. The example of the safe code: printf("%s", str);
General Analysis servermanager.cpp:1049 Medium V774 The 'pServer' pointer was used after the memory was released.
General Analysis servermanager.cpp:1085 Medium V618 It's dangerous to call the 'printf' function in such a manner, as the line being passed could contain format specification. The example of the safe code: printf("%s", str);
General Analysis servermanager.cpp:1077 Medium V618 It's dangerous to call the 'printf' function in such a manner, as the line being passed could contain format specification. The example of the safe code: printf("%s", str);
General Analysis serverthread.cpp:300 Medium V641 The size of the '& sas' buffer is not a multiple of the element size of the type 'struct sockaddr_in6'.
General Analysis serverthread.cpp:408 Medium V641 The size of the '& addr' buffer is not a multiple of the element size of the type 'struct sockaddr_in6'.
General Analysis serviceloop.cpp:246 Medium V641 The size of the '& pAccptSocket->m_Addr' buffer is not a multiple of the element size of the type 'struct sockaddr_in6'.
General Analysis serviceloop.cpp:248 Medium V641 The size of the '& pAccptSocket->m_Addr' buffer is not a multiple of the element size of the type 'struct sockaddr_in6'.
General Analysis serviceloop.cpp:250 Medium V641 The size of the '& pAccptSocket->m_Addr' buffer is not a multiple of the element size of the type 'struct sockaddr_in6'.
General Analysis serviceloop.cpp:257 Medium V641 The size of the '& pAccptSocket->m_Addr' buffer is not a multiple of the element size of the type 'struct sockaddr_in6'.
General Analysis settingmanager.cpp:2504 Medium V538 The line contains control character 0x0B (vertical tabulation).
General Analysis udpdebug.cpp:211 Medium V641 The size of the '& pNewDbg->m_sasTo' buffer is not a multiple of the element size of the type 'struct sockaddr_in6'.
General Analysis udpdebug.cpp:328 Medium V641 The size of the '& pNewDbg->m_sasTo' buffer is not a multiple of the element size of the type 'struct sockaddr_in6'.
General Analysis udpdebug.cpp:485 Medium V641 The size of the '& pCur->m_sasTo' buffer is not a multiple of the element size of the type 'struct sockaddr_in6'.
General Analysis udpthread.cpp:75 Medium V641 The size of the '& sas' buffer is not a multiple of the element size of the type 'struct sockaddr_in6'.
General Analysis updatecheckthread.cpp:336 Medium V701 realloc() possible leak: when realloc() fails in allocating memory, original pointer 'm_sRecvBuf' is lost. Consider assigning realloc() to a temporary pointer.
General Analysis utility.cpp:1238 Medium V641 The size of the '& sin6' buffer is not a multiple of the element size of the type 'struct sockaddr'.
General Analysis utility.cpp:1218 Medium V641 The size of the '& sas_addr' buffer is not a multiple of the element size of the type 'struct sockaddr_in6'.
General Analysis bansdialog.cpp:414 Medium V507 Pointer to local array 'msg' is stored outside the scope of this array. Such a pointer will become invalid.
General Analysis ptokax.cpp:117 Medium V560 A part of conditional expression is always true: szLen >= 1.
General Analysis rangebansdialog.cpp:389 Medium V507 Pointer to local array 'msg' is stored outside the scope of this array. Such a pointer will become invalid.
General Analysis registeredusersdialog.cpp:343 Medium V507 Pointer to local array 'sHexaHash' is stored outside the scope of this array. Such a pointer will become invalid.
General Analysis dccommands.cpp:523 Low V796 It is possible that 'break' statement is missing in switch statement.
General Analysis exceptionhandling.cpp:74 Low V676 It is incorrect to compare the variable of BOOL type with TRUE.
General Analysis exceptionhandling.cpp:104 Low V676 It is incorrect to compare the variable of BOOL type with TRUE.
General Analysis hashbanmanager.cpp:224 Low V512 A call of the 'memcpy' function will lead to underflow of the buffer '& pBan->m_ui32NickHash'.
General Analysis hashbanmanager.cpp:1044 Low V512 A call of the 'memcpy' function will lead to underflow of the buffer '& ui32Hash'.
General Analysis hashbanmanager.cpp:964 Low V512 A call of the 'memcpy' function will lead to underflow of the buffer '& ui32Hash'.
General Analysis hashbanmanager.cpp:827 Low V512 A call of the 'memcpy' function will lead to underflow of the buffer '& ui32Hash'.
General Analysis hashbanmanager.cpp:630 Low V512 A call of the 'memcpy' function will lead to underflow of the buffer '& pUser->m_ui32NickHash'.
General Analysis hashbanmanager.cpp:358 Low V512 A call of the 'memcpy' function will lead to underflow of the buffer '& pBan->m_ui32NickHash'.
General Analysis hashbanmanager.cpp:1929 Low V566 The integer constant is converted to pointer. Possibly an error or a bad coding style: (void *) 1
General Analysis hashbanmanager.cpp:1874 Low V566 The integer constant is converted to pointer. Possibly an error or a bad coding style: (void *) 1
General Analysis hashbanmanager.cpp:1880 Low V566 The integer constant is converted to pointer. Possibly an error or a bad coding style: (void *) 1
General Analysis hashbanmanager.cpp:1886 Low V566 The integer constant is converted to pointer. Possibly an error or a bad coding style: (void *) 1
General Analysis hashbanmanager.cpp:1889 Low V566 The integer constant is converted to pointer. Possibly an error or a bad coding style: (void *) 1
General Analysis hashbanmanager.cpp:1917 Low V566 The integer constant is converted to pointer. Possibly an error or a bad coding style: (void *) 1
General Analysis hashbanmanager.cpp:1923 Low V566 The integer constant is converted to pointer. Possibly an error or a bad coding style: (void *) 1
General Analysis hashbanmanager.cpp:1932 Low V566 The integer constant is converted to pointer. Possibly an error or a bad coding style: (void *) 1
General Analysis hashbanmanager.cpp:2010 Low V566 The integer constant is converted to pointer. Possibly an error or a bad coding style: (void *) 1
General Analysis hashbanmanager.cpp:2001 Low V566 The integer constant is converted to pointer. Possibly an error or a bad coding style: (void *) 1
General Analysis hashregmanager.cpp:492 Low V512 A call of the 'memcpy' function will lead to underflow of the buffer '& ui32Hash'.
General Analysis hashregmanager.cpp:468 Low V512 A call of the 'memcpy' function will lead to underflow of the buffer '& pReg->m_ui32Hash'.
General Analysis hashregmanager.cpp:532 Low V512 A call of the 'memcpy' function will lead to underflow of the buffer '& ui32Hash'.
General Analysis hashregmanager.cpp:321 Low V512 A call of the 'memcpy' function will lead to underflow of the buffer '& pReg->m_ui32Hash'.
General Analysis hashregmanager.cpp:512 Low V512 A call of the 'memcpy' function will lead to underflow of the buffer '& pUser->m_ui32NickHash'.
General Analysis hashregmanager.cpp:789 Low V525 The code contains the collection of similar blocks. Check items ''N'', ''I'', ''P'', ''A'', ''P'', ''R'' in lines 789, 790, 791, 792, 793, 794.
General Analysis hashusrmanager.cpp:61 Low V512 A call of the 'memcpy' function will lead to underflow of the buffer '& pUser->m_ui32NickHash'.
General Analysis hashusrmanager.cpp:133 Low V512 A call of the 'memcpy' function will lead to underflow of the buffer '& pUser->m_ui32NickHash'.
General Analysis hashusrmanager.cpp:245 Low V512 A call of the 'memcpy' function will lead to underflow of the buffer '& pUser->m_ui32NickHash'.
General Analysis hashusrmanager.cpp:219 Low V512 A call of the 'memcpy' function will lead to underflow of the buffer '& ui32Hash'.
General Analysis hubcommands.cpp:685 Low V522 There might be dereferencing of a potential null pointer 'sCmdParts[2]'.
General Analysis hubcommands.cpp:990 Low V522 There might be dereferencing of a potential null pointer 'sCmdParts[2]'.
General Analysis hubcommands.cpp:1077 Low V522 There might be dereferencing of a potential null pointer 'sCmdParts[3]'.
General Analysis hubcommands.cpp:805 Low V522 There might be dereferencing of a potential null pointer 'sCmdParts[2]'.
General Analysis hubcommands-iq.cpp:231 Low V522 There might be dereferencing of a potential null pointer 'sCmdParts[2]'.
General Analysis luabanmanlib.cpp:1549 Low V525 The code contains the collection of similar blocks. Check items '4', '3', '4', '4' in lines 1549, 1550, 1551, 1552.
General Analysis luabanmanlib.cpp:1259 Low V525 The code contains the collection of similar blocks. Check items '5', '4', '4', '1' in lines 1259, 1260, 1261, 1262.
General Analysis luabanmanlib.cpp:1311 Low V525 The code contains the collection of similar blocks. Check items '4', '4', '4', '1' in lines 1311, 1312, 1313, 1314.
General Analysis luabanmanlib.cpp:1430 Low V525 The code contains the collection of similar blocks. Check items '5', '3', '4', '4', '1' in lines 1430, 1431, 1432, 1433, 1434.
General Analysis luacorelib.cpp:135 Low V525 The code contains the collection of similar blocks. Check items '4', '4', '4', '1' in lines 135, 136, 137, 138.
General Analysis luacorelib.cpp:1829 Low V525 The code contains the collection of similar blocks. Check items '5', '4', '4' in lines 1829, 1830, 1831.
General Analysis luacorelib.cpp:1771 Low V525 The code contains the collection of similar blocks. Check items '5', '4', '4' in lines 1771, 1772, 1773.
General Analysis luacorelib.cpp:2298 Low V525 The code contains the collection of similar blocks. Check items '5', '4', '4' in lines 2298, 2299, 2300.
General Analysis luacorelib.cpp:2262 Low V525 The code contains the collection of similar blocks. Check items '3', '4', '4' in lines 2262, 2263, 2264.
General Analysis luaprofmanlib.cpp:680 Low V525 The code contains the collection of similar blocks. Check items '3', '3', '1' in lines 680, 681, 682.
General Analysis luaregmanlib.cpp:254 Low V525 The code contains the collection of similar blocks. Check items '4', '4', '3' in lines 254, 255, 256.
General Analysis luascriptmanager.cpp:325 Low V522 There might be dereferencing of a potential null pointer 'm_pRunningScriptS'.
General Analysis luasetmanlib.cpp:550 Low V525 The code contains the collection of similar blocks. Check items '1', '4', '4', '4' in lines 550, 551, 552, 553.
General Analysis profilemanager.cpp:362 Low V566 The integer constant is converted to pointer. Possibly an error or a bad coding style: (void *) 1
General Analysis regthread.cpp:685 Low V525 The code contains the collection of similar blocks. Check items ''x'', ''.'', ''p'', ''.'' in lines 685, 686, 687, 688.
General Analysis settingmanager.cpp:794 Low V575 The potential null pointer is passed into 'HeapReAlloc' function. Inspect the third argument.
General Analysis settingmanager.cpp:1114 Low V796 It is possible that 'break' statement is missing in switch statement.
General Analysis user.cpp:430 Low V525 The code contains the collection of similar blocks. Check items 'm_ui32OLimit', 'm_ui32LLimit', 'm_ui32LLimit', 'm_ui32DLimit' in lines 430, 437, 444, 451.
General Analysis user.cpp:399 Low V575 The potential null pointer is passed into 'atoi' function. Inspect the first argument.
General Analysis user.cpp:1359 Low V575 The potential null pointer is passed into 'HeapReAlloc' function. Inspect the third argument.
General Analysis user.cpp:1379 Low V769 The 'm_pSendBuf' pointer in the 'm_pSendBuf + m_ui32SendBufDataLen' expression could be nullptr. In such case, resulting value will be senseless and it should not be used.
General Analysis utility.cpp:1418 Low V524 It is odd that the body of 'be64toh' function is fully equivalent to the body of 'htobe64' function.
General Analysis bandialog.cpp:754 Low V575 The potential null pointer is passed into 'strcmp' function. Inspect the second argument.
General Analysis bandialog.cpp:691 Low V575 The potential null pointer is passed into 'strcmp' function. Inspect the second argument.
General Analysis bandialog.cpp:793 Low V575 The potential null pointer is passed into 'strcmp' function. Inspect the second argument.
General Analysis bandialog.cpp:66 Low V796 It is possible that 'break' statement is missing in switch statement.
General Analysis guisettingmanager.cpp:158 Low V525 The code contains the collection of similar blocks. Check items ''S'', ''I'', ''S'', ''V'' in lines 158, 159, 160, 161.
General Analysis guisettingmanager.cpp:174 Low V566 The integer constant is converted to pointer. Possibly an error or a bad coding style: (void *) 1
General Analysis mainwindow.cpp:162 Low V676 It is incorrect to compare the variable of BOOL type with TRUE. Correct expression is: 'bHotTrackEnabled != FALSE'.
General Analysis rangebandialog.cpp:66 Low V796 It is possible that 'break' statement is missing in switch statement.
General Analysis rangebandialog.cpp:475 Low V575 The potential null pointer is passed into 'strcmp' function. Inspect the second argument.
General Analysis rangebandialog.cpp:514 Low V575 The potential null pointer is passed into 'strcmp' function. Inspect the second argument.
General Analysis registereduserdialog.cpp:68 Low V796 It is possible that 'break' statement is missing in switch statement.
General Analysis settingpagedeflood.cpp:54 Low V525 The code contains the collection of similar blocks. Check items '1', '2', '1', '1', '1' in lines 54, 63, 78, 86, 94.
General Analysis settingpagegeneral2.cpp:91 Low V676 It is incorrect to compare the variable of BOOL type with TRUE. Correct expression is: 'bEnable != FALSE'.
Micro-optimizations profilemanager.cpp:285 High V814 Decreased performance. Calls to the 'strlen' function have being made multiple times when a condition for the loop's continuation was calculated.