BrickGame icon indicating copy to clipboard operation
BrickGame copied to clipboard

Random buffer overruns

Open Noxygen opened this issue 7 years ago • 1 comments

I was experiencing an "Stack cookie instrumentation code detected a stack-based buffer overrun." exception on large maps and it seems the following line is responsible for this: BrickTerrainGenerationLibrary.cpp:134 CavernProbabilitySamples[LocalZ + 4] = NextCavernProbabilitySample; On rare occasions CavernProbabilitySamples is being addressed at index 128 there but the maximum is 127. A simple workaround for this is to increase the array size (Line 123) by +1.

Please consider changing this if there will be a future update. Took me a couple of hours to figure this out.

Noxygen avatar Apr 09 '17 19:04 Noxygen

Thank you for the report. I can't try this out right now, but from reading the code, it does look like simply increasing the size of the array by 1 is the correct fix.

AndrewScheidecker avatar Apr 09 '17 20:04 AndrewScheidecker