X-Git-Url: https://git.wh0rd.org/?p=dump.git;a=blobdiff_plain;f=restore%2Ftape.c;h=b383866a6dd99bc9535d3d81d66ec7d35d107e39;hp=29807646f2aa01ba4133ecb9b688babfe712d0b8;hb=47acd076f971d347c39c498e69634a3aa0f73031;hpb=241ddca30657af0cb9dbc60685712d7a4989ee49 diff --git a/restore/tape.c b/restore/tape.c index 2980764..b383866 100644 --- a/restore/tape.c +++ b/restore/tape.c @@ -42,7 +42,7 @@ #ifndef lint static const char rcsid[] = - "$Id: tape.c,v 1.82 2004/08/16 09:39:47 stelian Exp $"; + "$Id: tape.c,v 1.83 2004/12/10 13:31:21 stelian Exp $"; #endif /* not lint */ #include @@ -1317,10 +1317,13 @@ xtrlnkfile(char *buf, size_t size) { pathlen += size; - if (pathlen > MAXPATHLEN) + if (pathlen > MAXPATHLEN) { + buf[size - 1] = '\0'; errx(1, "symbolic link name: %s->%s%s; too long %d", curfile.name, lnkbuf, buf, pathlen); + } (void) strcat(lnkbuf, buf); + lnkbuf[pathlen] = '\0'; } /*