2011-03-02 Michael Snyder <msnyder@vmware.com>
[deliverable/binutils-gdb.git] / gdb / printcmd.c
index 39ac8a8c16ef25050ca99b8b875c7b53f35d43c0..12249a004b0fe5b3c55d8ae21723e3b44b9673c9 100644 (file)
@@ -333,8 +333,8 @@ print_formatted (struct value *val, int size,
       || TYPE_CODE (type) == TYPE_CODE_NAMESPACE)
     value_print (val, stream, options);
   else
-    /* User specified format, so don't look to the the type to
-       tell us what to do.  */
+    /* User specified format, so don't look to the type to tell us
+       what to do.  */
     val_print_scalar_formatted (type,
                                value_contents_for_printing (val),
                                value_embedded_offset (val),
@@ -533,7 +533,7 @@ print_scalar_formatted (const void *valaddr, struct type *type,
            if (*cp == '\0')
              cp--;
          }
-       strcpy (buf, cp);
+       strncpy (buf, cp, sizeof (bits));
        fputs_filtered (buf, stream);
       }
       break;
This page took 0.025107 seconds and 4 git commands to generate.