From 0ae6f36bb14c78460f609eb5aa41be2f658649e2 Mon Sep 17 00:00:00 2001 From: Olly Betts Date: Tue, 5 Dec 2017 09:49:39 +1300 Subject: [PATCH] Fix buffer overrun when getting UUIDs from /proc --- xapian-core/common/proc_uuid.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xapian-core/common/proc_uuid.cc b/xapian-core/common/proc_uuid.cc index 8406372fd..40792acf6 100644 --- a/xapian-core/common/proc_uuid.cc +++ b/xapian-core/common/proc_uuid.cc @@ -79,7 +79,7 @@ void uuid_unparse_lower(const uuid_t uu, char * out) if ((0x2a8 >> i) & 1) *out++ = '-'; } - out[UUID_STRING_SIZE] = '\0'; + *out = '\0'; } void uuid_clear(uuid_t uu) -- 2.11.4.GIT