summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPixel <pixel@nobis-crew.org>2009-05-05 01:29:24 +0200
committerPixel <pixel@nobis-crew.org>2009-05-05 01:29:24 +0200
commit2d0d6175208b8567b8bb306ebba79da1fe7f1e3c (patch)
treee3acc36519987e4d3cb09058ed0c22bd9126cf01
parent7f340539163522da8d9f325b8297cbdf73d19690 (diff)
Securing mpqlib_fs_filelist output.
-rw-r--r--mpq-fs.c3
1 files changed, 3 insertions, 0 deletions
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;
}