Staging
v0.5.1
https://github.com/git/git
Revision 883653babd8ee7ea23e6a5c392bb739348b1eb61 authored by Junio C Hamano on 13 September 2006, 06:53:27 UTC, committed by Junio C Hamano on 13 September 2006, 07:54:43 UTC
Fetch over http from a repository that uses alternates to borrow
from neighbouring repositories were quite broken, apparently for
some time now.

We parse input and count bytes to allocate the new buffer, and
when we copy into that buffer we know exactly how many bytes we
want to copy from where.  Using strlcpy for it was simply
stupid, and the code forgot to take it into account that strlcpy
terminated the string with NUL.

Signed-off-by: Junio C Hamano <junkio@cox.net>
1 parent 60a6bf5
Raw File
Tip revision: 883653babd8ee7ea23e6a5c392bb739348b1eb61 authored by Junio C Hamano on 13 September 2006, 06:53:27 UTC
http-fetch: fix alternates handling.
Tip revision: 883653b
tag.h
#ifndef TAG_H
#define TAG_H

#include "object.h"

extern const char *tag_type;

struct tag {
	struct object object;
	struct object *tagged;
	char *tag;
	char *signature; /* not actually implemented */
};

extern struct tag *lookup_tag(const unsigned char *sha1);
extern int parse_tag_buffer(struct tag *item, void *data, unsigned long size);
extern int parse_tag(struct tag *item);
extern struct object *deref_tag(struct object *, const char *, int);

#endif /* TAG_H */
back to top