[SCM] The rsync repository. - branch master updated

Rsync CVS commit messages rsync-cvs at lists.samba.org
Sun Dec 16 00:58:53 UTC 2018


The branch, master has been updated
       via  a3668685 Avoid a potential out-of-bounds read in daemon mode if argc is 0.
      from  f55d35c5 Try to be clearer that --append-verify isn't a general-purpose-copy option.

https://git.samba.org/?p=rsync.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit a3668685354e7457ac3e29634083906ee5435bf2
Author: Wayne Davison <wayned at samba.org>
Date:   Sat Dec 15 16:52:53 2018 -0800

    Avoid a potential out-of-bounds read in daemon mode if argc is 0.

-----------------------------------------------------------------------

Summary of changes:
 NEWS      | 3 +++
 options.c | 4 ++++
 2 files changed, 7 insertions(+)


Changeset truncated at 500 lines:

diff --git a/NEWS b/NEWS
index 1bcdba72..de493a05 100644
--- a/NEWS
+++ b/NEWS
@@ -4,6 +4,9 @@ Changes since 3.1.3:
 
   BUG FIXES:
 
+    - Avoid a potential out-of-bounds read in daemon mode if argc can be made
+      to become 0.
+
     - Fix xattr filter rules losing an 'x' attribute in a non-local transfer.
 
     - Fix a compiler error/warning about shifting a negative value (in the zlib
diff --git a/options.c b/options.c
index 1c5b42d0..a07c8e13 100644
--- a/options.c
+++ b/options.c
@@ -1315,6 +1315,10 @@ int parse_arguments(int *argc_p, const char ***argv_p)
 	int opt;
 	int orig_protect_args = protect_args;
 
+	if (argc == 0) {
+		strlcpy(err_buf, "argc is zero!\n", sizeof err_buf);
+		return 0;
+	}
 	if (ref && *ref)
 		set_refuse_options(ref);
 	if (am_daemon) {


-- 
The rsync repository.



More information about the rsync-cvs mailing list