From: Art Cancro Date: Tue, 31 Jul 2012 21:36:53 +0000 (-0400) Subject: When using the Linux kernel UUID generator, null terminate X-Git-Tag: v8.16~24 X-Git-Url: https://code.citadel.org/?p=citadel.git;a=commitdiff_plain;h=1c81990cf77f3bf041a335368b2b446728f8fe77 When using the Linux kernel UUID generator, null terminate --- 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; + } } }