Blame SOURCES/coverity2.patch

ca2856
diff --up ./src/compare_db.c ./src/compare_db.c
ca2856
--- ./src/compare_db.c
ca2856
+++ ./src/compare_db.c
ca2856
@@ -438,7 +438,11 @@ snprintf(*values[0], l, "%s",s);
ca2856
     } else {
ca2856
         *values = malloc(1 * sizeof (char*));
ca2856
         if (DB_FTYPE&attr) {
ca2856
-            easy_string(get_file_type_string(line->perm))
ca2856
+            char *file_type = get_file_type_string(line->perm);
ca2856
+            if (!file_type) {
ca2856
+                error(2,"%s: ", file_type);
ca2856
+            }
ca2856
+            easy_string(file_type)
ca2856
         } else if (DB_LINKNAME&attr) {
ca2856
             easy_string(line->linkname)
ca2856
         easy_number((DB_SIZE|DB_SIZEG),size,"%li")
ca2856
diff -up ./src/db_file.c ./src/db_file.c
ca2856
--- ./src/db_file.c
ca2856
+++ ./src/db_file.c
ca2856
@@ -194,6 +194,10 @@ int db_file_read_spec(int db){
ca2856
 
ca2856
   *db_order=(DB_FIELD*) malloc(1*sizeof(DB_FIELD));
ca2856
   
ca2856
+  if (*db_order == NULL){
ca2856
+    error(1,"malloc for *db_order failed in %s", __func__);
ca2856
+  }
ca2856
+
ca2856
   while ((i=db_scan())!=TNEWLINE){
ca2856
     switch (i) {
ca2856
       
ca2856