projects
/
citadel.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
cdde4bb
)
When using the Linux kernel UUID generator, null terminate
author
Art Cancro
<ajc@uncensored.citadel.org>
Tue, 31 Jul 2012 21:36:53 +0000
(17:36 -0400)
committer
Art Cancro
<ajc@uncensored.citadel.org>
Tue, 31 Jul 2012 22:38:28 +0000
(18:38 -0400)
libcitadel/lib/tools.c
patch
|
blob
|
history
diff --git
a/libcitadel/lib/tools.c
b/libcitadel/lib/tools.c
index d738451a14234f045e5eaee4fa4870397807152d..f520ee2d96b5365d2876a8385fbd50b6788672cb 100644
(file)
--- 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;
+ }
}
}