diff options
Diffstat (limited to 'gdb/solib-darwin.c')
-rw-r--r-- | gdb/solib-darwin.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/gdb/solib-darwin.c b/gdb/solib-darwin.c index 31a0b2f..a235f8a 100644 --- a/gdb/solib-darwin.c +++ b/gdb/solib-darwin.c @@ -277,9 +277,8 @@ darwin_current_sos (void) auto li = gdb::make_unique<lm_info_darwin> (); - strncpy (newobj->so_name, file_path.get (), SO_NAME_MAX_PATH_SIZE - 1); - newobj->so_name[SO_NAME_MAX_PATH_SIZE - 1] = '\0'; - strcpy (newobj->so_original_name, newobj->so_name); + newobj->so_name = file_path.get (); + newobj->so_original_name = newobj->so_name; li->lm_addr = load_addr; newobj->lm_info = std::move (li); |