[Kst] kdeextragear-2/kst/kst/datasources/dirfile

George Staikos staikos at kde.org
Mon Dec 6 06:25:54 CET 2004


CVS commit by staikos: 

don't access invalid memory on an invalid format file
BUG: 93011


  M +4 -0      getdata.c   1.25


--- kdeextragear-2/kst/kst/datasources/dirfile/getdata.c  #1.24:1.25
@@ -314,4 +314,5 @@ struct FormatType *GetFormat(const char 
       *error_code = GD_E_FORMAT;
       FreeF(F);
+      Formats.n--;
       return(NULL);
     }
@@ -319,4 +320,5 @@ struct FormatType *GetFormat(const char 
       *error_code = GD_E_FIELD;
       FreeF(F);
+      Formats.n--;
       return(NULL);
     }
@@ -357,4 +359,5 @@ struct FormatType *GetFormat(const char 
     } else {
       FreeF(F);
+      Formats.n--;
       *error_code = GD_E_FORMAT;
       return(NULL);
@@ -362,4 +365,5 @@ struct FormatType *GetFormat(const char 
     if (*error_code!=GD_E_OK) {
       FreeF(F);
+      Formats.n--;
       return(NULL);
     }





More information about the Kst mailing list