diff options
author | Dave Wallace <dwallacelf@gmail.com> | 2017-07-31 13:33:11 -0400 |
---|---|---|
committer | Dave Wallace <dwallacelf@gmail.com> | 2017-07-31 13:33:11 -0400 |
commit | b88566498a83209f8646e4a6b1d247e69dae2aeb (patch) | |
tree | 77a56083d0bd13e9ed6fb63b7be86294d0a71aee /src/svm/ssvm.c | |
parent | 84f28824763031c4be3f33aed2289a1e2a32d4c4 (diff) |
ssvm->name must be a vector containing a c-string.
Change-Id: I14a97a7fdd000da62d2ed4bea71f55ee34a21311
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
Diffstat (limited to 'src/svm/ssvm.c')
-rw-r--r-- | src/svm/ssvm.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/svm/ssvm.c b/src/svm/ssvm.c index 23e3cf443c3..e56e6b4523d 100644 --- a/src/svm/ssvm.c +++ b/src/svm/ssvm.c @@ -32,6 +32,7 @@ ssvm_master_init (ssvm_private_t * ssvm, u32 master_index) if (CLIB_DEBUG > 1) clib_warning ("[%d] creating segment '%s'", getpid (), ssvm->name); + ASSERT (vec_c_string_is_terminated (ssvm->name)); ssvm_filename = format (0, "/dev/shm/%s%c", ssvm->name, 0); unlink ((char *) ssvm_filename); @@ -110,6 +111,7 @@ ssvm_slave_init (ssvm_private_t * ssvm, int timeout_in_seconds) int ssvm_fd = -1; ssvm_shared_header_t *sh; + ASSERT (vec_c_string_is_terminated (ssvm->name)); ssvm->i_am_master = 0; while (timeout_in_seconds-- > 0) |