>> +static struct ref *alloc_ref_with_prefix(const char *prefix, size_t prefixlen, >> + const char *name) >> +{ >> + size_t len = strlen(name); >> + struct ref *ref = xcalloc(1, sizeof(struct ref) + prefixlen + len + 1); >> + memcpy(ref->name, prefix, prefixlen); >> + memcpy(ref->name + prefixlen, name, len); > Where does you \0-terminate the string? xcalloc() calls calloc(), which zeroes the memory. René -- 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