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