pv 964111, rv lachlan - > attrname[DM_ATTR_NAME_SIZE] = '\0'; /* terminate...
authorVlad Apostolov <vapo@sgi.com>
Wed, 8 Aug 2007 07:53:19 +0000 (07:53 +0000)
committerVlad Apostolov <vapo@sgi.com>
Wed, 8 Aug 2007 07:53:19 +0000 (07:53 +0000)
Merge of master-melb:xfs-cmds:29347a by kenmcd.

  pv 964111, rv lachlan - terminate attribute name string

dmapi/src/suite1/cmd/print_event.c

index 3e01e77f201bff10bd27589199ea6ec7ba4af8a4..c926e05f4b970708af0427ec0d6366f61e68c046 100644 (file)
@@ -532,6 +532,7 @@ handle_message(
     }
     if (msg_ds->ds_attrname.an_chars[0] != '\0') {
       strncpy(attrname, (char *)msg_ds->ds_attrname.an_chars, sizeof(attrname));
+      attrname[DM_ATTR_NAME_SIZE] = '\0';  /* terminate the string */
     } else {
       strcpy(attrname, "<NONE>");
     }