[PATCH] Fix symbolic ref validation
Use the correct buffer when validating 'ref: refs/...' Signed-off-by: Jonas Fonseca <fonseca@diku.dk> Signed-off-by: Junio C Hamano <junkio@cox.net>
This commit is contained in:

committed by
Junio C Hamano

parent
d6e548d61f
commit
85912b0673
2
refs.c
2
refs.c
@ -46,7 +46,7 @@ int validate_symref(const char *path)
|
|||||||
len -= 4;
|
len -= 4;
|
||||||
while (len && isspace(*buf))
|
while (len && isspace(*buf))
|
||||||
buf++, len--;
|
buf++, len--;
|
||||||
if (len >= 5 && !memcmp("refs/", buffer, 5))
|
if (len >= 5 && !memcmp("refs/", buf, 5))
|
||||||
return 0;
|
return 0;
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user