fix regression from last commit
This commit is contained in:
parent
9328d2690e
commit
2d8eb85f01
1 changed files with 1 additions and 1 deletions
2
stagit.c
2
stagit.c
|
@ -708,7 +708,7 @@ writeblob(git_object *obj, const char *fpath, const char *filename, git_off_t fi
|
|||
if (mkdirp(d))
|
||||
return -1;
|
||||
|
||||
for (p = fpath; *p; p++) {
|
||||
for (p = fpath, tmp[0] = '\0'; *p; p++) {
|
||||
if (*p == '/' && strlcat(tmp, "../", sizeof(tmp)) >= sizeof(tmp))
|
||||
errx(1, "path truncated: '../%s'", tmp);
|
||||
p++;
|
||||
|
|
Loading…
Reference in a new issue