From: Benoît Ganne Date: Wed, 9 Sep 2020 08:00:34 +0000 (+0200) Subject: svm: fix non-null-terminated string X-Git-Tag: v21.01-rc0~5 X-Git-Url: https://gerrit.fd.io/r/gitweb?a=commitdiff_plain;h=da5b4efbabae1271e245a5869268a0030d2a8c55;p=vpp.git svm: fix non-null-terminated string Type: fix Change-Id: Ia9cd71ce12584cd8ef90bfe357cf762dd7653f71 Signed-off-by: Benoît Ganne --- diff --git a/src/svm/svm.c b/src/svm/svm.c index 20f4b7a6e7a..fc917825be6 100644 --- a/src/svm/svm.c +++ b/src/svm/svm.c @@ -330,7 +330,7 @@ svm_data_region_create (svm_map_region_args_t * a, svm_region_t * rp) } close (fd); CLIB_MEM_UNPOISON (rp->data_base, map_size); - rp->backing_file = (char *) format (0, "%s\0", a->backing_file); + rp->backing_file = (char *) format (0, "%s%c", a->backing_file, 0); rp->flags |= SVM_FLAGS_FILE; }