Commit 50a8fd03 by Carlos Martín Nieto

Fix the reference character check for Unicode

We need to do an unsigned comparison, as otherwise UTF-8 characters
might look like they have the sign bit set and the check will fail.

Signed-off-by: Carlos Martín Nieto <cmn@elego.de>
parent 3a97bff3
......@@ -1647,7 +1647,7 @@ void git_repository__refcache_free(git_refcache *refs)
*****************************************/
static int check_valid_ref_char(char ch)
{
if (ch <= ' ')
if ((unsigned) ch <= ' ')
return GIT_ERROR;
switch (ch) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment