Commit 4496957d authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

Avoid alloca()

By the way, alloca() _cannot_ return NULL. It simply crashes if there
is not enough memory.
parent b870bc9d
......@@ -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) )
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment