quiverteam / Engine

Modified Version of Source 2007
104 stars 29 forks source link

Fix Double Free in KeyValues `#include` macro #86

Open Nopey opened 4 years ago

Nopey commented 4 years ago

I don't know if this is the bug that the valvesoftware wiki mentions, but I have experienced memory corruption and segfaults (in other source games) from this bug.

Basically, the AppendIncludedKeys function appends the included KeyValues directly, without reallocating. Then, the included KeyValues are freed, while in use. This commit removes the free.