Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int
- iconvert_new (LPCTSTR source, LPTSTR *destination,
- int source_coding, int destination_coding,
- bool alphabet_only)
- {
- LPTSTR dest = (LPTSTR) malloc (_tcslen (source) + 1 + 10);
- int result = -3;
- if (dest)
- {
- _tcscpy (dest, source);
- ....
- }
- This suspicious code was found in WinMerge project by PVS-Studio static code analyzer.
- Warning message is:
- V635 Consider inspecting the expression. The length should probably be multiplied by the sizeof(wchar_t). cs2cs.cpp 236
- PVS-Studio is a static analyzer for detecting bugs in the source code of applications written in C, C++, C++11, C++/CX. Site: http://www.viva64.com/en/pvs-studio/
Advertisement
Add Comment
Please, Sign In to add comment