Andrew's git
/
gitweb.git
/ blobdiff
summary
|
log
|
commit
|
diff
|
tree
commit
grep
author
committer
pickaxe
?
re
refname_is_safe(): don't allow the empty string
[gitweb.git]
/
refs.c
diff --git
a/refs.c
b/refs.c
index 5789152743ffbf0ac0f9a0270e2d689349cf7682..ca0280f7eb6898a0fb7a5f2ccc2ec42f94860189 100644
(file)
--- a/
refs.c
+++ b/
refs.c
@@
-136,11
+136,12
@@
int refname_is_safe(const char *refname)
free(buf);
return result;
}
- while (*refname) {
+
+ do {
if (!isupper(*refname) && *refname != '_')
return 0;
refname++;
- }
+ }
while (*refname);
return 1;
}