parent
b682969367
commit
ae200ee594
2
rsh.c
2
rsh.c
|
@ -48,7 +48,7 @@ int setup_connection(int *fd_in, int *fd_out, char *remote_prog,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
strcpy(posn, " -");
|
strcpy(posn, " -");
|
||||||
if (socketpair(AF_LOCAL, SOCK_STREAM, 0, sv)) {
|
if (socketpair(AF_UNIX, SOCK_STREAM, 0, sv)) {
|
||||||
return error("Couldn't create socket");
|
return error("Couldn't create socket");
|
||||||
}
|
}
|
||||||
if (!fork()) {
|
if (!fork()) {
|
||||||
|
|
8
tag.c
8
tag.c
|
@ -26,6 +26,10 @@ int parse_tag(struct tag *item)
|
||||||
char type[20];
|
char type[20];
|
||||||
void *data, *bufptr;
|
void *data, *bufptr;
|
||||||
unsigned long size;
|
unsigned long size;
|
||||||
|
int typelen, taglen;
|
||||||
|
unsigned char object[20];
|
||||||
|
const char *type_line, *tag_line, *sig_line;
|
||||||
|
|
||||||
if (item->object.parsed)
|
if (item->object.parsed)
|
||||||
return 0;
|
return 0;
|
||||||
item->object.parsed = 1;
|
item->object.parsed = 1;
|
||||||
|
@ -37,10 +41,6 @@ int parse_tag(struct tag *item)
|
||||||
return error("Object %s not a tag",
|
return error("Object %s not a tag",
|
||||||
sha1_to_hex(item->object.sha1));
|
sha1_to_hex(item->object.sha1));
|
||||||
|
|
||||||
int typelen, taglen;
|
|
||||||
unsigned char object[20];
|
|
||||||
const char *type_line, *tag_line, *sig_line;
|
|
||||||
|
|
||||||
if (size < 64)
|
if (size < 64)
|
||||||
return -1;
|
return -1;
|
||||||
if (memcmp("object ", data, 7) || get_sha1_hex(data + 7, object))
|
if (memcmp("object ", data, 7) || get_sha1_hex(data + 7, object))
|
||||||
|
|
Loading…
Reference in New Issue