tagged_items.c: statically verify size of tagged item header
authorEric Biggers <ebiggers3@gmail.com>
Wed, 18 Jan 2017 04:32:54 +0000 (20:32 -0800)
committerEric Biggers <ebiggers3@gmail.com>
Wed, 18 Jan 2017 05:29:15 +0000 (21:29 -0800)
src/tagged_items.c

index 82beb48..69eb640 100644 (file)
@@ -63,6 +63,8 @@ inode_get_tagged_item(const struct wim_inode *inode, u32 tag, u32 min_len,
        struct tagged_item_header *hdr;
        size_t len_remaining;
 
+       STATIC_ASSERT(sizeof(*hdr) == 8);
+
        if (!inode->i_extra)
                return NULL;