nsgmls: resolve coverity warnings related to uninitialed members in C++ classes
[oweals/cde.git] / cde / programs / dtcreate / cmncbs.c
index 5e0c3f882aece40ec5c1bb5fc5aca3259384f06a..5046aeebfec774bc3312afb32197b2a5f3e87140 100644 (file)
@@ -29,6 +29,7 @@
 /*                                                                           */
 /*****************************************************************************/
 #include <stdio.h>
+#include <sys/types.h>
 #include <sys/signal.h>
 #include <X11/cursorfont.h>
 
@@ -270,8 +271,7 @@ void DisplayHelpDialog(Widget wid, XtPointer client_data, XtPointer cbs)
   sprintf(pszTitle, "%s  -  %s", GETMESSAGE(3, 10, "Create Action"),
           GETMESSAGE(2, 53, "Help"));
   */
-  sprintf(pszTitle, "%s  -  ", GETMESSAGE(3, 10, "Create Action"));
-  strcat(pszTitle, GETMESSAGE(2, 53, "Help"));
+  snprintf(pszTitle, sizeof(pszTitle), "%s  -  %s", GETMESSAGE(3, 10, "Create Action"), GETMESSAGE(2, 53, "Help"));
   XtSetArg(args[i], XmNtitle, pszTitle); i++;
 
   /***********************************************************************/