Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #define CORE_MTA_NEWS_ITEMS 3
- CGUILabel* m_pNewsItemLabels[CORE_MTA_NEWS_ITEMS];
- CGUILabel* m_pNewsItemShadowLabels[CORE_MTA_NEWS_ITEMS];
- void CMainMenu::SetNewsHeadline (....)
- {
- ....
- for ( char i=0; i <= CORE_MTA_NEWS_ITEMS; i++ )
- {
- m_pNewsItemLabels[ i ]->SetFont ( szFontName );
- m_pNewsItemShadowLabels[ i ]->SetFont ( szFontName );
- ....
- }
- ....
- }
- This suspicious code was found in MTASA project by PVS-Studio static code analyzer.
- Warning message is:
- V557 Array overrun is possible. The value of 'i' index could reach 3. cmainmenu.cpp 1062
- 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
Advertisement