Ignore:
Timestamp:
Jan 5, 2011, 12:19:12 PM (14 years ago)
Author:
garnier
Message:

update

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/source/visualization/OpenGL/src/G4OpenGLXViewer.cc

    r1346 r1348  
    2525//
    2626//
    27 // $Id: G4OpenGLXViewer.cc,v 1.56 2010/11/10 17:57:16 allison Exp $
     27// $Id: G4OpenGLXViewer.cc,v 1.57 2010/12/11 17:04:07 allison Exp $
    2828// GEANT4 tag $Name:  $
    2929//
     
    7777
    7878#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)
    8080
    8181#define USE_DEFAULT_COLORMAP 1
     
    256256  if (G4VisManager::GetVerbosity() >= G4VisManager::confirmations)
    257257    G4cout << "Window name: " << fName << G4endl;
    258   strncpy (charViewName, fName, 100);
     258  strncpy (charViewName, fName, 99); charViewName[99] = '\0';
    259259  char *window_name = charViewName;
    260260  char *icon_name = charViewName;
     
    386386cmap (0)
    387387{
     388  // To satisfy Coverity
     389  xwa.visual = 0;
     390  iconName.value = 0;
     391  xwa.screen = 0;
     392  windowName.value = 0;
     393
    388394  GetXConnection ();
    389395  if (fViewId < 0) return;
Note: See TracChangeset for help on using the changeset viewer.