From c40b7cf4df97b7212cae742d3e22d51249d525bf Mon Sep 17 00:00:00 2001 From: Art Cancro Date: Tue, 31 Jul 2012 17:36:53 -0400 Subject: [PATCH] When using the Linux kernel UUID generator, null terminate --- libcitadel/lib/tools.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libcitadel/lib/tools.c b/libcitadel/lib/tools.c index d738451a1..f520ee2d9 100644 --- a/libcitadel/lib/tools.c +++ b/libcitadel/lib/tools.c @@ -885,7 +885,10 @@ void generate_uuid(char *buf) { int rv; rv = fread(buf, 36, 1, fp); fclose(fp); - if (rv == 1) return; + if (rv == 1) { + buf[36] = 0; + return; + } } } -- 2.30.2