On Mon, 05 Apr 2010 20:58:05 +0100, Nick Edelen <sirnot@xxxxxxxxx> wrote: > + /* initialize header */ > + strcpy(head.signature, "REVCACHE"); head.signature is 8 characters (see below), and so is "REVCACHE". Surely either head.signature needs to be 9 characters, or you shouldn't use strcpy. Indeed, mostly you do seem to be using memcpy ... This is in a couple of other places too, with both rc_index_header, and rc_slice_header. > +/* single index maps objects to cache files */ > +struct rc_index_header { > + char signature[8]; /* REVINDEX */ > + unsigned char version; > + uint32_t ofs_objects; > + > + uint32_t object_nr; > + unsigned char cache_nr; > + > + uint32_t max_date; > +}; > +/* structure for actual cache file */ > +struct rc_slice_header { > + char signature[8]; /* REVCACHE */ > + unsigned char version; > + uint32_t ofs_objects; > + > + uint32_t object_nr; > + uint16_t path_nr; > + uint32_t size; > + > + unsigned char sha1[20]; > +}; -- Julian -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html