[PVS-Studio] Fix assignment in DenibblizeTrack() and potential buffer overflow in SetCurrentImageDir()
This commit is contained in:
parent
5f1decaaea
commit
2f645d68f4
2 changed files with 2 additions and 2 deletions
|
@ -550,7 +550,7 @@ void SetCurrentImageDir(const char* pszImageDir)
|
|||
strcpy(g_sCurrentDir, pszImageDir);
|
||||
|
||||
int nLen = strlen( g_sCurrentDir );
|
||||
if( g_sCurrentDir[ nLen - 1 ] != '\\' )
|
||||
if ((nLen > 0) && (g_sCurrentDir[ nLen - 1 ] != '\\'))
|
||||
{
|
||||
g_sCurrentDir[ nLen + 0 ] = '\\';
|
||||
g_sCurrentDir[ nLen + 1 ] = 0;
|
||||
|
|
|
@ -436,7 +436,7 @@ void CImageBase::DenibblizeTrack(LPBYTE trackimage, SectorOrder_e SectorOrder, i
|
|||
offset = 0;
|
||||
}
|
||||
|
||||
if ((bytenum == 3) && (byteval[1] = 0xAA))
|
||||
if ((bytenum == 3) && (byteval[1] == 0xAA))
|
||||
{
|
||||
int loop = 0;
|
||||
int tempoffset = offset;
|
||||
|
|
Loading…
Add table
Reference in a new issue