summaryrefslogtreecommitdiffstats
path: root/bftw.c
diff options
context:
space:
mode:
Diffstat (limited to 'bftw.c')
-rw-r--r--bftw.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/bftw.c b/bftw.c
index 8dd98c9..60bc145 100644
--- a/bftw.c
+++ b/bftw.c
@@ -627,7 +627,10 @@ static int bftw_path_concat(struct bftw_state *state, const char *subpath) {
state->status = BFTW_CHILD;
- return dstrcatat(&state->path, nameoff, subpath);
+ if (dstresize(&state->path, nameoff) != 0) {
+ return -1;
+ }
+ return dstrcat(&state->path, subpath);
}
/**