From: Jonas Fonseca Date: Wed, 5 Oct 2005 15:52:12 +0000 (+0200) Subject: [PATCH] Fix symbolic ref validation X-Git-Tag: v0.99.8b~1^2~4 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=85912b06734286108d0ec33f0479677e2fce252d;p=git.git [PATCH] Fix symbolic ref validation Use the correct buffer when validating 'ref: refs/...' Signed-off-by: Jonas Fonseca Signed-off-by: Junio C Hamano --- diff --git a/refs.c b/refs.c index 2aac90ca5..5a8cbd4ef 100644 --- a/refs.c +++ b/refs.c @@ -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; }