Jeff King <peff@xxxxxxxx> writes: > Yeah, that is a possibility, though it involves casting away some > constness. Patch is below, which seems to work. Hmm, because this was after I read this part: > ... match_basename, despite taking the length > of all of the strings we pass it, will happily use NUL-terminated > functions like strcmp or fnmatch. I actually meant to do that inside match_basename(), not in one particular caller of it. Otherwise, new callers to match_basename() will also suffer from this broken API that pretends as if it takes counted strings but uses strings as NUL terminated, no? > It still feels really ugly to me, and like match_basename is misdesigned > and should respect the lengths we pass it. Exactly. -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html