Make use of size assertions in references where possible.
[cumulus.git] / subfile.cc
index 4e13005..df6d3b2 100644 (file)
@@ -23,6 +23,7 @@
  * referenced from the new metadata log. */
 
 #include <stdlib.h>
+#include <string.h>
 #include <assert.h>
 #include <arpa/inet.h>
 
@@ -266,6 +267,7 @@ list<ObjectReference> Subfile::create_incremental(TarSegmentStore *tss,
         db->StoreObject(ref, block_csum, analyzed_len, block_age);
         if (analyzed_len >= 16384)
             store_block_signatures(ref, new_block_summary);
+        ref.set_range(0, analyzed_len, true);
         refs.push_back(ref);
         delete o;
         return refs;