From 5f78206a0829d7778a1810feecfe13917d1e6d1f Mon Sep 17 00:00:00 2001 From: Florent Bruneau Date: Thu, 2 Oct 2008 21:42:11 +0200 Subject: [PATCH] Fix a valgrind warning in unit test runner. Signed-off-by: Florent Bruneau --- postlicyd/tst-filters.c | 2 ++ 1 file changed, 2 insertions(+) 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); } -- 2.20.1