From: Florent Bruneau Date: Thu, 2 Oct 2008 19:42:11 +0000 (+0200) Subject: Fix a valgrind warning in unit test runner. X-Git-Url: http://git.madism.org/?a=commitdiff_plain;h=5f78206a0829d7778a1810feecfe13917d1e6d1f;p=apps%2Fpfixtools.git Fix a valgrind warning in unit test runner. Signed-off-by: Florent Bruneau --- diff --git a/postlicyd/tst-filters.c b/postlicyd/tst-filters.c index 52f22a4..4dcbaa8 100644 --- a/postlicyd/tst-filters.c +++ b/postlicyd/tst-filters.c @@ -62,6 +62,8 @@ static char *read_query(const char *basepath, const char *filename, if (end != NULL) { *end = buff + (map.end - map.map); **end = '\0'; + } else { + buff[map.end - map.map] = '\0'; } file_map_close(&map); }