libcareplus/0018-kpatch_storage-put-an-end-to-description-string-load.patch
Jiajie Li 2b0fff2855 AArch64 support: add aarch64 support for libcareplus
Add related code which make libcareplus can run basic demo on aarch64.

Signed-off-by: Jiajie Li <lijiajie11@huawei.com>
2021-02-10 09:18:56 +08:00

30 lines
729 B
Diff

From 3954dd43124e87c788352ccc528cc79e8fca6f6d Mon Sep 17 00:00:00 2001
From: YiFan <loyfan@users.noreply.github.com>
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