diff --git a/src/shared_library.c b/src/shared_library.c index e450c877..9bdfc7a2 100644 --- a/src/shared_library.c +++ b/src/shared_library.c @@ -177,7 +177,7 @@ rcutils_load_shared_library( continue; } lib->library_path = lib->allocator.reallocate( - buffer, buffer_size, lib->allocator.state); + buffer, buffer_size + 1, lib->allocator.state); if (NULL == lib->library_path) { lib->library_path = buffer; }