From 3954dd43124e87c788352ccc528cc79e8fca6f6d Mon Sep 17 00:00:00 2001 From: YiFan Date: Tue, 13 Aug 2019 11:02:36 +0800 Subject: [PATCH 18/89] kpatch_storage: put an end to description string loaded Description string should be ended up with a '\0'. --- src/kpatch_storage.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/kpatch_storage.c b/src/kpatch_storage.c index a466460..2375559 100644 --- a/src/kpatch_storage.c +++ b/src/kpatch_storage.c @@ -377,8 +377,10 @@ char *storage_get_description(kpatch_storage_t *storage, if (rv == -1) goto err_free; - if (rv == 0) + if (rv == 0) { + desc[sz] = '\0'; break; + } sz += rv; } -- 2.23.0