Index: src/Element/periodentafel.cpp
===================================================================
--- src/Element/periodentafel.cpp	(revision f54cda477802ae5ec4ae53e98479ad5c92509535)
+++ src/Element/periodentafel.cpp	(revision 76096d54add38ae24a29f974d65800c56758f43d)
@@ -44,4 +44,5 @@
 #include "element.hpp"
 #include "elements_db.hpp"
+#include "Helpers/defs.hpp"
 #include "periodentafel.hpp"
 
@@ -296,8 +297,11 @@
   bool status = true;
   bool otherstatus = true;
-  char filename[255];
+  char filename[MAXSTRINGSIZE];
 
   // fill elements DB
-  strncpy(filename, path, MAXSTRINGSIZE);
+  if (strlen(path)+1+strlen(STANDARDELEMENTSDB) > MAXSTRINGSIZE-1)
+    ELOG(2, "Generated path '" << path << "' will be too long.");
+  filename[0] = '\0';
+  strncat(filename, path, MAXSTRINGSIZE);
   strncat(filename, "/", MAXSTRINGSIZE-strlen(filename));
   strncat(filename, STANDARDELEMENTSDB, MAXSTRINGSIZE-strlen(filename));
@@ -633,5 +637,8 @@
   char filename[MAXSTRINGSIZE];
 
-  strncpy(filename, path, MAXSTRINGSIZE);
+  if (strlen(path)+1+strlen(STANDARDELEMENTSDB) > MAXSTRINGSIZE-1)
+    ELOG(2, "Generated path '" << path << "' will be too long.");
+  filename[0] = '\0';
+  strncat(filename, path, MAXSTRINGSIZE);
   strncat(filename, "/", MAXSTRINGSIZE-strlen(filename));
   strncat(filename, STANDARDELEMENTSDB, MAXSTRINGSIZE-strlen(filename));
Index: src/Fragmentation/EnergyMatrix.cpp
===================================================================
--- src/Fragmentation/EnergyMatrix.cpp	(revision f54cda477802ae5ec4ae53e98479ad5c92509535)
+++ src/Fragmentation/EnergyMatrix.cpp	(revision 76096d54add38ae24a29f974d65800c56758f43d)
@@ -39,4 +39,5 @@
 
 #include "CodePatterns/Log.hpp"
+#include "Helpers/defs.hpp"
 #include "KeySetsContainer.hpp"
 
@@ -94,5 +95,5 @@
 bool EnergyMatrix::ParseFragmentMatrix(const char *name, const char *prefix, std::string suffix, int skiplines, int skipcolumns)
 {
-  char filename[1024];
+  char filename[MAXSTRINGSIZE];
   bool status = MatrixContainer::ParseFragmentMatrix(name, prefix, suffix, skiplines, skipcolumns);
 
@@ -115,7 +116,10 @@
 
     // try independently to parse global energysuffix file if present
-    strncpy(filename, name, 1023);
-    strncat(filename, prefix, 1023-strlen(filename));
-    strncat(filename, suffix.c_str(), 1023-strlen(filename));
+    if (strlen(name)+strlen(prefix)+suffix.size() > MAXSTRINGSIZE-1)
+      ELOG(2, "Generated path '" << name << "' will be too long.");
+    filename[0] = '\0';
+    strncat(filename, name, MAXSTRINGSIZE);
+    strncat(filename, prefix, MAXSTRINGSIZE-strlen(filename));
+    strncat(filename, suffix.c_str(), MAXSTRINGSIZE-strlen(filename));
     std::ifstream input(filename);
     ParseMatrix(input, skiplines, skipcolumns, MatrixCounter);
Index: src/Fragmentation/Summation/SetValues/unittests/FragmentUnitTest.cpp
===================================================================
--- src/Fragmentation/Summation/SetValues/unittests/FragmentUnitTest.cpp	(revision f54cda477802ae5ec4ae53e98479ad5c92509535)
+++ src/Fragmentation/Summation/SetValues/unittests/FragmentUnitTest.cpp	(revision 76096d54add38ae24a29f974d65800c56758f43d)
@@ -505,4 +505,5 @@
   ia >> samefragment;
 
+  CPPUNIT_ASSERT( samefragment != NULL );
   CPPUNIT_ASSERT( *fragment == *samefragment );
 
Index: src/Fragmentation/analyzer.cpp
===================================================================
--- src/Fragmentation/analyzer.cpp	(revision f54cda477802ae5ec4ae53e98479ad5c92509535)
+++ src/Fragmentation/analyzer.cpp	(revision 76096d54add38ae24a29f974d65800c56758f43d)
@@ -119,5 +119,5 @@
   // Test the given directory
   if (!TestParams(argc, argv)) {
-    delete dir;
+    delete[] dir;
     delete periode;
     return 1;
Index: src/Parser/PcpParser_helper.cpp
===================================================================
--- src/Parser/PcpParser_helper.cpp	(revision f54cda477802ae5ec4ae53e98479ad5c92509535)
+++ src/Parser/PcpParser_helper.cpp	(revision 76096d54add38ae24a29f974d65800c56758f43d)
@@ -163,9 +163,9 @@
               line++;
             } while ((dummy1[0] == '#') || (dummy1[0] == '\n'));
-            if (dummy1 == NULL){
-              if (verbose) fprintf(stderr,"Error reading line %i\n", line);
-            } else {
-              //fprintf(stderr,"Reading next line %i: %s\n", line, dummy1);
-            }
+//            if (dummy1 == NULL){
+//              if (verbose) fprintf(stderr,"Error reading line %i\n", line);
+//            } else {
+//              //fprintf(stderr,"Reading next line %i: %s\n", line, dummy1);
+//            }
           } else { // simple int, strings or doubles start in the same line
             while ((*dummy == '\t') || (*dummy == ' '))   // skip interjacent tabs and spaces
Index: src/Tesselation/BoundaryPolygonSet.cpp
===================================================================
--- src/Tesselation/BoundaryPolygonSet.cpp	(revision f54cda477802ae5ec4ae53e98479ad5c92509535)
+++ src/Tesselation/BoundaryPolygonSet.cpp	(revision 76096d54add38ae24a29f974d65800c56758f43d)
@@ -107,5 +107,6 @@
     (*TotalNormal) += TemporaryNormal;
   }
-  TotalNormal->Scale(1. / (double) counter);
+  if (counter != 0.)
+    TotalNormal->Scale(1. / (double) counter);
 
   // make it always point inward (any offset vector onto plane projected onto normal vector suffices)
Index: src/Tesselation/boundary.cpp
===================================================================
--- src/Tesselation/boundary.cpp	(revision f54cda477802ae5ec4ae53e98479ad5c92509535)
+++ src/Tesselation/boundary.cpp	(revision 76096d54add38ae24a29f974d65800c56758f43d)
@@ -752,5 +752,5 @@
     mol->CenterInBox();
   }
-  delete GreatestDiameter;
+  delete[] GreatestDiameter;
   // update Box of atoms by boundary
   mol->SetBoxDimension(&BoxLengths);
