summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorRichard Sharpe <sharpe@samba.org>1998-06-22 06:31:39 +0000
committerRichard Sharpe <sharpe@samba.org>1998-06-22 06:31:39 +0000
commit9d001d5c959d8fb5b4f14529e73ed2453035283b (patch)
tree9c42e944aaeb4a2e74087a48a12d682814e4db90 /source3
parent8afebcdd7e055cd6c6f9eb69f9ba652b4e1ab591 (diff)
downloadsamba-9d001d5c959d8fb5b4f14529e73ed2453035283b.tar.gz
samba-9d001d5c959d8fb5b4f14529e73ed2453035283b.tar.bz2
samba-9d001d5c959d8fb5b4f14529e73ed2453035283b.zip
Arrrgh, one more fix. Restores of long file names were
broken ... Added a bzero of the buffer the names went into ... Seems OK now ... Richard Sharpe (This used to be commit c749c8d0460feddafaa68654d8a4bec33f97cc8c)
Diffstat (limited to 'source3')
-rw-r--r--source3/client/clitar.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/source3/client/clitar.c b/source3/client/clitar.c
index d7d47fc903..eba82ba217 100644
--- a/source3/client/clitar.c
+++ b/source3/client/clitar.c
@@ -1888,14 +1888,19 @@ static void do_tarput()
return;
}
+
+ bzero(longname, finfo.size + strlen(cur_dir) +1);
+
buffer_p += TBLOCK; /* Skip that longlink header */
/* This needs restructuring ... */
- strncpy(longname, cur_dir, strlen(cur_dir) + 1);
+ safe_strcpy(longname, cur_dir, strlen(cur_dir) + 1);
cp = longname + strlen(cur_dir);
file_len = finfo.size;
+ DEBUG(5, ("longname=%0X, cp=%0X, file_len=%i\n", longname, cp, file_len));
+
while (file_len > 0) {
if (buffer_p >= endofbuffer) {
@@ -1912,7 +1917,7 @@ static void do_tarput()
cp = cp + strlen(cp); /* Move to end of string */
buffer_p += TBLOCK;
file_len -= TBLOCK;
-
+ DEBUG(5, ("cp=%0X, file_len=%i\n", cp, file_len));
next_header = 1; /* Force read of next header */
}