aux/depend: fix %.*s format in path concatenation
This commit is contained in:
parent
bc5b85c37c
commit
b4b4d2286b
|
@ -1379,7 +1379,9 @@ getfile(Dfile *df, File *f)
|
|||
f->use++;
|
||||
if(f->fd < 0){
|
||||
name = strrchr(df->path, '/') + 1;
|
||||
n = snprint(path, sizeof path, "%.*s/%s", (int)(name-df->path), df->path, f->name);
|
||||
n = snprint(path, sizeof path, "%.*s/%s",
|
||||
utfnlen(df->path, name-df->path), df->path,
|
||||
f->name);
|
||||
if(n >= sizeof path - UTFmax){
|
||||
syslog(0, dependlog, "path name too long: %.20s.../%.20s...", df->path, f->name);
|
||||
return -1;
|
||||
|
|
Loading…
Reference in a new issue