shithub: choc

Download patch

ref: 7393226342f22c525299cbfcc902c11e2876daa5
parent: e6250d6a64c037e3f6073cc105f3b5cd9a0d645a
author: Azarien <Azarien@users.noreply.github.com>
date: Thu Sep 10 10:47:55 EDT 2015

Ensure the buffer is zero-terminated.

--- a/src/gusconf.c
+++ b/src/gusconf.c
@@ -192,6 +192,7 @@
     data = Z_Malloc(len + 1, PU_STATIC, NULL);
     W_ReadLump(lumpnum, data);
 
+    data[len] = '\0';
     return data;
 }