Add VES stndDefined PM and subscription for O-DU.
[sim/o1-interface.git] / ntsimulator / ntsim-ng / utils / sys_utils.c
index d6def2e..9b49995 100644 (file)
@@ -88,12 +88,13 @@ char *file_read_content(const char *fname) {
         fseek(f, 0, SEEK_END);
         length = ftell(f);
         fseek(f, 0, SEEK_SET);
-        buffer = (char*)malloc(sizeof(char) * length);
+        buffer = (char*)malloc(sizeof(char) * (length + 1));
         if(buffer) {
             fread(buffer, 1, length, f);
         }
         fclose(f);
     }
+    buffer[length] = 0;
 
     return buffer;
 }