From 2d8eb85f01fdb97ab76c538b868128db4c3e99f0 Mon Sep 17 00:00:00 2001 From: Hiltjo Posthuma Date: Tue, 3 May 2016 20:28:09 +0200 Subject: [PATCH] fix regression from last commit --- stagit.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stagit.c b/stagit.c index d318c13..85b782a 100644 --- a/stagit.c +++ b/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++;