summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoy Marples <uberlord@gentoo.org>2007-08-22 09:51:17 +0000
committerRoy Marples <uberlord@gentoo.org>2007-08-22 09:51:17 +0000
commit80d1eb6a9496ab13d9dfaae2b9f48eb0c9954762 (patch)
treeb3e0ceea8be6b2c4a977ed794218a1433e2eac00 /net-misc/rsync/files
parentAdd .menu to allowed extensions. Missed in the last commit... (diff)
downloadgentoo-2-80d1eb6a9496ab13d9dfaae2b9f48eb0c9954762.tar.gz
gentoo-2-80d1eb6a9496ab13d9dfaae2b9f48eb0c9954762.tar.bz2
gentoo-2-80d1eb6a9496ab13d9dfaae2b9f48eb0c9954762.zip
Fix off-by-one errors, #189132 thanks to Tobias Scherbaum.
(Portage version: 2.1.3.6)
Diffstat (limited to 'net-misc/rsync/files')
-rw-r--r--net-misc/rsync/files/digest-rsync-2.6.9-r33
-rw-r--r--net-misc/rsync/files/rsync-2.6.9-fname-obo.patch60
2 files changed, 63 insertions, 0 deletions
diff --git a/net-misc/rsync/files/digest-rsync-2.6.9-r3 b/net-misc/rsync/files/digest-rsync-2.6.9-r3
new file mode 100644
index 000000000000..fca949e58851
--- /dev/null
+++ b/net-misc/rsync/files/digest-rsync-2.6.9-r3
@@ -0,0 +1,3 @@
+MD5 996d8d8831dbca17910094e56dcb5942 rsync-2.6.9.tar.gz 811841
+RMD160 36d270d9f01e9a8e808f426196796001bdd3d5d2 rsync-2.6.9.tar.gz 811841
+SHA256 ca437301becd890e73300bc69a39189ff1564baa761948ff149b3dd7bde633f9 rsync-2.6.9.tar.gz 811841
diff --git a/net-misc/rsync/files/rsync-2.6.9-fname-obo.patch b/net-misc/rsync/files/rsync-2.6.9-fname-obo.patch
new file mode 100644
index 000000000000..2fa0113020b7
--- /dev/null
+++ b/net-misc/rsync/files/rsync-2.6.9-fname-obo.patch
@@ -0,0 +1,60 @@
+--- rsync-2.6.9.orig/sender.c 2006-09-20 03:53:32.000000000 +0200
++++ rsync-2.6.9/sender.c 2007-07-25 15:33:05.000000000 +0200
+@@ -123,6 +123,7 @@
+ char fname[MAXPATHLEN];
+ struct file_struct *file;
+ unsigned int offset;
++ size_t l = 0;
+
+ if (ndx < 0 || ndx >= the_file_list->count)
+ return;
+@@ -133,6 +134,20 @@
+ file->dir.root, "/", NULL);
+ } else
+ offset = 0;
++
++ l = offset + 1;
++ if (file) {
++ if (file->dirname)
++ l += strlen(file->dirname);
++ if (file->basename)
++ l += strlen(file->basename);
++ }
++
++ if (l >= sizeof(fname)) {
++ rprintf(FERROR, "Overlong pathname\n");
++ exit_cleanup(RERR_FILESELECT);
++ }
++
+ f_name(file, fname + offset);
+ if (remove_source_files) {
+ if (do_unlink(fname) == 0) {
+@@ -224,6 +239,7 @@
+ enum logcode log_code = log_before_transfer ? FLOG : FINFO;
+ int f_xfer = write_batch < 0 ? batch_fd : f_out;
+ int i, j;
++ size_t l = 0;
+
+ if (verbose > 2)
+ rprintf(FINFO, "send_files starting\n");
+@@ -259,6 +275,20 @@
+ fname[offset++] = '/';
+ } else
+ offset = 0;
++
++ l = offset + 1;
++ if (file) {
++ if (file->dirname)
++ l += strlen(file->dirname);
++ if (file->basename)
++ l += strlen(file->basename);
++ }
++
++ if (l >= sizeof(fname)) {
++ rprintf(FERROR, "Overlong pathname\n");
++ exit_cleanup(RERR_FILESELECT);
++ }
++
+ fname2 = f_name(file, fname + offset);
+
+ if (verbose > 2)