diff options
-rw-r--r-- | sfeed_frames.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sfeed_frames.c b/sfeed_frames.c index 5d40d07..e25ad28 100644 --- a/sfeed_frames.c +++ b/sfeed_frames.c @@ -181,8 +181,9 @@ main(int argc, char *argv[]) /* directory doesn't exist: try to create it. */ if(stat(dirpath, &st) == -1 && mkdir(dirpath, S_IRWXU) == -1) - xerr(1, "sfeed_frames: can't make directory '%s'", dirpath); - strlcpy(reldirpath, name, sizeof(reldirpath)); /* TODO: check truncation */ + xerr(1, "can't make directory '%s'", dirpath); + if(strlcpy(reldirpath, name, sizeof(reldirpath)) >= sizeof(reldirpath)) + xerr(1, "strlcpy: truncation"); if(!(f = calloc(1, sizeof(struct feed)))) xerr(1, "calloc"); |