Merge branch 'sb/submodule-helper-clone-regression-fix' into maint
[gitweb.git] / builtin / merge-recursive.c
index a90f28f34d2072b7d40964a7fa3cf46d3bb98cdd..491efd556e87d0b263bb1029e0cabb9b7f6f1472 100644 (file)
@@ -14,7 +14,7 @@ static const char *better_branch_name(const char *branch)
 
        if (strlen(branch) != 40)
                return branch;
-       sprintf(githead_env, "GITHEAD_%s", branch);
+       xsnprintf(githead_env, sizeof(githead_env), "GITHEAD_%s", branch);
        name = getenv(githead_env);
        return name ? name : branch;
 }