Commit 68f2ab93 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont Committed by Jean-Baptiste Kempf

Avoid alloca()

By the way, alloca() _cannot_ return NULL. It simply crashes if there
is not enough memory.
parent b116a86f
......@@ -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