ValveSoftware / csgo-demoinfo

CS:GO demo parsing tool

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

x64 build throws malloc errors

WillBrindle opened this issue · comments

This wouldn't run correctly for me on OS X 64-bit without the 32-bit compiler flag (-m32). I believe it comes down to line 397 in demofilebitbuf.cpp. Size of 32 is hard coded for some things but we convert to an unsigned long and move pOut by that much, which when built for 64-bit is 64 bits, and therefore write to more memory than we assigned. I believe just using an int in its place should work and appears to work.

Is this only designed for 32-bit architecture? Are other things likely to go wrong with this fix? I have briefly tested out putting game events and it appeared to work as expected.

Hi Will,

this commit abenea/demoinfogo-linux@da17ab2 might help