diff options
author | Benoît Ganne <bganne@cisco.com> | 2020-09-09 10:00:34 +0200 |
---|---|---|
committer | Florin Coras <florin.coras@gmail.com> | 2020-09-09 14:49:59 +0000 |
commit | da5b4efbabae1271e245a5869268a0030d2a8c55 (patch) | |
tree | a6eb6b4f1cd2d139b36cba67cd00b788c1059528 /src/svm/svm.c | |
parent | d78a5bc03ec25360a9a045c20d55a61fcee6f0d2 (diff) |
svm: fix non-null-terminated string
Type: fix
Change-Id: Ia9cd71ce12584cd8ef90bfe357cf762dd7653f71
Signed-off-by: Benoît Ganne <bganne@cisco.com>
Diffstat (limited to 'src/svm/svm.c')
-rw-r--r-- | src/svm/svm.c | 2 |
1 files changed, 1 insertions, 1 deletions
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; } |