Coverity fixes.
authormorsch <morsch@f7af4fe6-9843-0410-8265-dc069ae4e863>
Sat, 29 Jan 2011 18:22:01 +0000 (18:22 +0000)
committermorsch <morsch@f7af4fe6-9843-0410-8265-dc069ae4e863>
Sat, 29 Jan 2011 18:22:01 +0000 (18:22 +0000)
EPOS/TEpos.cxx

index 343dccc..e9dd810 100644 (file)
@@ -185,11 +185,11 @@ void TEpos::GenerateInputFile() {
        char epo[256];
        char *epoEnv = getenv("EPO");
        if (epoEnv) {
-               strcpy(epo, epoEnv);
+               strncpy(epo, 256, epoEnv);
        } else {
-               strcpy(epo, getenv("ALICE_ROOT"));
+               strncpy(epo, 256, getenv("ALICE_ROOT"));
        }
-       strcat(epo, "/EPOS/epos167");
+       strncat(epo, 256, "/EPOS/epos167");
 
        file << "fname pathnx " << epo << "/" << endl;
        file << "fname histo none" << endl;