Skip to content

Commit 42df13b

Browse files
server: fixed code scanning alert in saverestore.cpp
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
1 parent fbd31fa commit 42df13b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

server/saverestore.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1082,7 +1082,7 @@ int CRestore::ReadFields( const char *pname, const void *pBaseData, DATAMAP *pMa
10821082
{
10831083
// Don't clear global fields
10841084
if (!m_global || !(pFields[i].flags & FTYPEDESC_GLOBAL))
1085-
memset(((char *)pBaseData + pFields[i].fieldOffset), 0, pFields[i].fieldSize * GetFieldSize(&pFields[i]));
1085+
memset(((char *)pBaseData + pFields[i].fieldOffset), 0, static_cast<size_t>(pFields[i].fieldSize) * GetFieldSize(&pFields[i]));
10861086
}
10871087
}
10881088

0 commit comments

Comments
 (0)