mirror of
https://github.com/reactos/reactos.git
synced 2024-10-02 07:26:47 +00:00
[ATL] - Fix buffer overflow in CComDynamicUnkArray::Add. Found by Coverity (CID 2474)
[NDK] - Remove meaningless const attribute from pointer rvalues to make Coverity's life easier svn path=/trunk/; revision=54401
This commit is contained in:
parent
022c6505d0
commit
6c0659ceac
|
@ -27,10 +27,10 @@ Author:
|
||||||
// KPCR Access for non-IA64 builds
|
// KPCR Access for non-IA64 builds
|
||||||
//
|
//
|
||||||
#define K0IPCR ((ULONG_PTR)(KIP0PCRADDRESS))
|
#define K0IPCR ((ULONG_PTR)(KIP0PCRADDRESS))
|
||||||
#define PCR ((KPCR * const)K0IPCR)
|
#define PCR ((KPCR *)K0IPCR)
|
||||||
#if defined(CONFIG_SMP) || defined(NT_BUILD)
|
#if defined(CONFIG_SMP) || defined(NT_BUILD)
|
||||||
#undef KeGetPcr
|
#undef KeGetPcr
|
||||||
#define KeGetPcr() ((KPCR * const)__readfsdword(FIELD_OFFSET(KPCR, SelfPcr)))
|
#define KeGetPcr() ((KPCR *)__readfsdword(FIELD_OFFSET(KPCR, SelfPcr)))
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
//
|
//
|
||||||
|
|
|
@ -128,7 +128,7 @@ typedef CCHAR KPROCESSOR_MODE;
|
||||||
//
|
//
|
||||||
// Dereferencable pointer to KUSER_SHARED_DATA in User-Mode
|
// Dereferencable pointer to KUSER_SHARED_DATA in User-Mode
|
||||||
//
|
//
|
||||||
#define SharedUserData ((KUSER_SHARED_DATA *CONST)USER_SHARED_DATA)
|
#define SharedUserData ((KUSER_SHARED_DATA *)USER_SHARED_DATA)
|
||||||
|
|
||||||
//
|
//
|
||||||
// Maximum WOW64 Entries in KUSER_SHARED_DATA
|
// Maximum WOW64 Entries in KUSER_SHARED_DATA
|
||||||
|
|
|
@ -849,9 +849,10 @@ public:
|
||||||
return 0;
|
return 0;
|
||||||
m_ppUnk = newArray;
|
m_ppUnk = newArray;
|
||||||
memset(&m_ppUnk[m_nSize], 0, (newSize - m_nSize) * sizeof(IUnknown *));
|
memset(&m_ppUnk[m_nSize], 0, (newSize - m_nSize) * sizeof(IUnknown *));
|
||||||
|
curCookie = m_nSize + 1;
|
||||||
m_nSize = newSize;
|
m_nSize = newSize;
|
||||||
m_ppUnk[m_nSize] = pUnk;
|
m_ppUnk[curCookie - 1] = pUnk;
|
||||||
return m_nSize + 1;
|
return curCookie;
|
||||||
}
|
}
|
||||||
|
|
||||||
BOOL Remove(DWORD dwCookie)
|
BOOL Remove(DWORD dwCookie)
|
||||||
|
|
Loading…
Reference in a new issue