Fix a valgrind warning in unit test runner.
authorFlorent Bruneau <florent.bruneau@polytechnique.org>
Thu, 2 Oct 2008 19:42:11 +0000 (21:42 +0200)
committerFlorent Bruneau <florent.bruneau@polytechnique.org>
Thu, 2 Oct 2008 19:42:11 +0000 (21:42 +0200)
Signed-off-by: Florent Bruneau <florent.bruneau@polytechnique.org>
postlicyd/tst-filters.c

index 52f22a4..4dcbaa8 100644 (file)
@@ -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);
     }