Author: akhaldi
Date: Wed Jan 18 23:34:26 2012
New Revision: 55007
URL:
http://svn.reactos.org/svn/reactos?rev=55007&view=rev
Log:
[PORTCLS]
* Fix a bug in PcNewResourceSublist which led to memory corruption.
Modified:
trunk/reactos/drivers/wdm/audio/backpln/portcls/resource.cpp
Modified: trunk/reactos/drivers/wdm/audio/backpln/portcls/resource.cpp
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/wdm/audio/backpln/…
==============================================================================
--- trunk/reactos/drivers/wdm/audio/backpln/portcls/resource.cpp [iso-8859-1] (original)
+++ trunk/reactos/drivers/wdm/audio/backpln/portcls/resource.cpp [iso-8859-1] Wed Jan 18
23:34:26 2012
@@ -427,7 +427,7 @@
#endif
/* Allocate resource list */
- NewList->m_TranslatedResourceList = (PCM_RESOURCE_LIST)AllocateItem(PoolType,
sizeof(CM_RESOURCE_LIST), TAG_PORTCLASS);
+ NewList->m_TranslatedResourceList = (PCM_RESOURCE_LIST)AllocateItem(PoolType,
ResourceSize, TAG_PORTCLASS);
if (!NewList->m_TranslatedResourceList)
{
/* No memory */
@@ -436,7 +436,7 @@
}
/* Allocate resource list */
- NewList->m_UntranslatedResourceList = (PCM_RESOURCE_LIST)AllocateItem(PoolType,
sizeof(CM_RESOURCE_LIST), TAG_PORTCLASS);
+ NewList->m_UntranslatedResourceList = (PCM_RESOURCE_LIST)AllocateItem(PoolType,
ResourceSize, TAG_PORTCLASS);
if (!NewList->m_UntranslatedResourceList)
{
/* No memory */