1
0
Fork 0
mirror of https://github.com/git/git.git synced 2024-05-27 06:26:13 +02:00

[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:
Jonas Fonseca 2005-10-05 17:52:12 +02:00 committed by Junio C Hamano
parent d6e548d61f
commit 85912b0673

2
refs.c
View File

@ -46,7 +46,7 @@ int validate_symref(const char *path)
len -= 4;
while (len && isspace(*buf))
buf++, len--;
if (len >= 5 && !memcmp("refs/", buffer, 5))
if (len >= 5 && !memcmp("refs/", buf, 5))
return 0;
return -1;
}