]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
filejournal: initialize header before writing
authorSage Weil <sage.weil@dreamhost.com>
Thu, 19 Jan 2012 00:24:38 +0000 (16:24 -0800)
committerSage Weil <sage.weil@dreamhost.com>
Sat, 28 Jan 2012 18:56:52 +0000 (10:56 -0800)
Avoid writing uninitialized crap.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
src/os/FileJournal.cc

index b326fea360aa5af0d0690ee132043a3629962848..5a2ec11d2d72a39aac57048a5f6711cf377b28c9 100644 (file)
@@ -786,6 +786,7 @@ int FileJournal::prepare_single_write(bufferlist& bl, off64_t& queue_pos, uint64
     
   // add it this entry
   entry_header_t h;
+  memset(&h, 0, sizeof(h));
   h.seq = seq;
   h.pre_pad = pre_pad;
   h.len = ebl.length();