Merge pull request #477 from davidgyu/winbuildfix

Fixed an alloca buffer overrun error in Far
This commit is contained in:
Takahito Tejima 2015-05-14 18:24:41 -07:00
commit c11041f93d

View File

@ -1294,7 +1294,7 @@ PatchTablesFactory::populateAdaptivePatches(
int * levelFVarVertOffsets = 0;
if (context.RequiresFVarPatches()) {
int nchannels = refiner.GetNumFVarChannels();
levelFVarVertOffsets = (int *)alloca(nchannels);
levelFVarVertOffsets = (int *)alloca(nchannels*sizeof(int));
memset(levelFVarVertOffsets, 0, nchannels*sizeof(int));
}