Snap for 11566117 from 91c61110b370de3cad269a6fed39b3c6c184500b to sdk-release

Change-Id: I282ef72f8a975493fbd208068cc986c05887b956
diff --git a/client.c b/client.c
index b073302..2b8d057 100644
--- a/client.c
+++ b/client.c
@@ -906,6 +906,11 @@
     struct obj_ref ref = OBJ_REF_INITIAL_VALUE(ref);
 
     file_info = file_get_info(tr, block_mac, &ref);
+    if (!file_info) {
+        printf("can't read file entry at %" PRIu64 "\n",
+               block_mac_to_block(tr, block_mac));
+        return true;
+    }
 
     if (strncmp(file_info->path, miter->prefix, miter->prefix_len) == 0) {
         storage_file_list_add(miter,
@@ -1092,4 +1097,4 @@
     }
 
     return STORAGE_NO_ERROR;
-}
\ No newline at end of file
+}
diff --git a/file.c b/file.c
index 16a64f7..2248f96 100644
--- a/file.c
+++ b/file.c
@@ -955,6 +955,10 @@
         }
 
         stop = state->file(state, tr, &block_mac, added, removed);
+
+        if (tr->failed) {
+            return FILE_OP_ERR_FAILED;
+        }
         if (stop) {
             return FILE_OP_SUCCESS;
         }