Browse Source

Avoid alloca()

By the way, alloca() _cannot_ return NULL. It simply crashes if there
is not enough memory.
pull/2/head
Rémi Denis-Courmont 18 years ago
parent
commit
4496957d9f
  1. 4
      projects/activex/persiststreaminit.cpp

4
projects/activex/persiststreaminit.cpp

@ -417,9 +417,7 @@ private:
if( 0 == len )
return E_INVALIDARG;
LPWSTR propName = (LPOLESTR)::alloca((len+1)*sizeof(WCHAR));
if( NULL == propName )
return E_OUTOFMEMORY;
WCHAR propName[len + 1];
result = pStm->Read(propName, len*sizeof(WCHAR), NULL);
if( FAILED(result) )

Loading…
Cancel
Save