From 2d0d6175208b8567b8bb306ebba79da1fe7f1e3c Mon Sep 17 00:00:00 2001 From: Pixel Date: Tue, 5 May 2009 01:29:24 +0200 Subject: Securing mpqlib_fs_filelist output. --- mpq-fs.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'mpq-fs.c') diff --git a/mpq-fs.c b/mpq-fs.c index c055b17..c2934f8 100644 --- a/mpq-fs.c +++ b/mpq-fs.c @@ -151,6 +151,9 @@ int mpqlib_fs_filelist(char * buffer) { *(p++) = '\n'; } } while (hnext(hash_table)); + + if (p) + *p = 0; return r_size; } -- cgit v1.2.3