Changeset 1348 for trunk/source/visualization/OpenGL/src/G4OpenGLXViewer.cc
- Timestamp:
- Jan 5, 2011, 12:19:12 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/source/visualization/OpenGL/src/G4OpenGLXViewer.cc
r1346 r1348 25 25 // 26 26 // 27 // $Id: G4OpenGLXViewer.cc,v 1.5 6 2010/11/10 17:57:16allison Exp $27 // $Id: G4OpenGLXViewer.cc,v 1.57 2010/12/11 17:04:07 allison Exp $ 28 28 // GEANT4 tag $Name: $ 29 29 // … … 77 77 78 78 #define NewString(str) \ 79 ((str) != NULL ? (strcpy((char*)malloc((unsigned)strlen(str) + 1), str)) : (char*)NULL)79 ((str) != 0 ? (strncpy((char*)malloc((unsigned)strlen(str) + 1), str, (unsigned)strlen(str) + 1)) : (char*)0) 80 80 81 81 #define USE_DEFAULT_COLORMAP 1 … … 256 256 if (G4VisManager::GetVerbosity() >= G4VisManager::confirmations) 257 257 G4cout << "Window name: " << fName << G4endl; 258 strncpy (charViewName, fName, 100);258 strncpy (charViewName, fName, 99); charViewName[99] = '\0'; 259 259 char *window_name = charViewName; 260 260 char *icon_name = charViewName; … … 386 386 cmap (0) 387 387 { 388 // To satisfy Coverity 389 xwa.visual = 0; 390 iconName.value = 0; 391 xwa.screen = 0; 392 windowName.value = 0; 393 388 394 GetXConnection (); 389 395 if (fViewId < 0) return;
Note: See TracChangeset
for help on using the changeset viewer.