Update ISA 3.0 / POWER9 gdb tests to match GAS test cases.
[deliverable/binutils-gdb.git] / gdb / completer.c
index 5c3b3fcfaaeaa06acdb86aafe5987bc75c4dcc18..d0e6bc80fd1243dd9e0d690bd525b73312a38244 100644 (file)
@@ -264,7 +264,8 @@ linespec_location_completer (struct cmd_list_element *ignore,
       char *s;
 
       file_to_match = (char *) xmalloc (colon - text + 1);
-      strncpy (file_to_match, text, colon - text + 1);
+      strncpy (file_to_match, text, colon - text);
+      file_to_match[colon - text] = '\0';
       /* Remove trailing colons and quotes from the file name.  */
       for (s = file_to_match + (colon - text);
           s > file_to_match;
This page took 0.023979 seconds and 4 git commands to generate.