diff options
author | Eric Andersen | 2001-05-07 17:48:28 +0000 |
---|---|---|
committer | Eric Andersen | 2001-05-07 17:48:28 +0000 |
commit | 28355a36da6ad4d1b55ba9bb146fb0b6586e7edb (patch) | |
tree | d08439547c9b94e1d0211fb0de91e68fc3180fe4 /archival/tar.c | |
parent | 822c3837f95a355f90d25aaabeb2445bb5eb1bf0 (diff) | |
download | busybox-28355a36da6ad4d1b55ba9bb146fb0b6586e7edb.zip busybox-28355a36da6ad4d1b55ba9bb146fb0b6586e7edb.tar.gz |
Per some comments from Lars Kellogg-Stedman <lars@larsshack.org>,
make xreadlink() return NULL on failure, and make sure everyone
uses the interface correctly.
-Erik
Diffstat (limited to 'archival/tar.c')
-rw-r--r-- | archival/tar.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/archival/tar.c b/archival/tar.c index eb085c7..135bfd1 100644 --- a/archival/tar.c +++ b/archival/tar.c @@ -922,6 +922,8 @@ writeTarHeader(struct TarBallInfo *tbInfo, const char *header_name, strncpy(header.linkname, tbInfo->hlInfo->name, sizeof(header.linkname)); } else if (S_ISLNK(statbuf->st_mode)) { char *lpath = xreadlink(real_name); + if (!lpath) /* Already printed err msg inside xreadlink() */ + return ( FALSE); header.typeflag = SYMTYPE; strncpy(header.linkname, lpath, sizeof(header.linkname)); free(lpath); |