mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-12 00:50:40 +00:00
fix 156967 using stand-alone msg window can cause memory corruption/crashes r=naving, sr=sspitzer, a=asa
This commit is contained in:
parent
9896d08d55
commit
6e02745ae6
@ -267,7 +267,7 @@ void nsUInt32Array::CopyArray(nsUInt32Array &oldA)
|
||||
if (m_pData)
|
||||
PR_Free(m_pData);
|
||||
m_nSize = oldA.m_nSize;
|
||||
m_nMaxSize = oldA.m_nMaxSize;
|
||||
m_nMaxSize = oldA.m_nSize;
|
||||
m_pData = (PRUint32 *)PR_Malloc(m_nSize * sizeof(PRUint32));
|
||||
if (m_pData)
|
||||
memcpy(m_pData, oldA.m_pData, m_nSize * sizeof(PRUint32));
|
||||
|
@ -144,7 +144,7 @@ void nsUint8Array::CopyArray(nsUint8Array &aSrcArray)
|
||||
{
|
||||
PR_FREEIF(m_pData);
|
||||
m_nSize = aSrcArray.m_nSize;
|
||||
m_nMaxSize = aSrcArray.m_nMaxSize;
|
||||
m_nMaxSize = aSrcArray.m_nSize;
|
||||
m_pData = (PRUint8*)PR_Malloc(m_nSize * sizeof(PRUint8));
|
||||
if (m_pData)
|
||||
memcpy(m_pData, aSrcArray.m_pData, m_nSize * sizeof(PRUint8));
|
||||
|
Loading…
Reference in New Issue
Block a user