The Samba-Bugzilla – Attachment 13732 Details for
Bug 13104
NULL deref do_server_sender when argc=0
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
patch to handle argc == 0
do_server_sender_argc0.patch (text/plain), 1.07 KB, created by
jeriko.one
on 2017-10-27 02:38:47 UTC
(
hide
)
Description:
patch to handle argc == 0
Filename:
MIME Type:
Creator:
jeriko.one
Created:
2017-10-27 02:38:47 UTC
Size:
1.07 KB
patch
obsolete
>From 57d2c72e6d41410f25ccc5ab661fcd46e4e68866 Mon Sep 17 00:00:00 2001 >From: Jeriko One <jeriko.one@gmx.us> >Date: Thu, 26 Oct 2017 19:34:24 -0700 >Subject: [PATCH] handle no arguments to do_server_sender > >--- > main.c | 9 ++++++++- > 1 file changed, 8 insertions(+), 1 deletion(-) > >diff --git a/main.c b/main.c >index 3908ccf5..cf5b6eb5 100644 >--- a/main.c >+++ b/main.c >@@ -783,7 +783,7 @@ static void read_final_goodbye(int f_in, int f_out) > static void do_server_sender(int f_in, int f_out, int argc, char *argv[]) > { > struct file_list *flist; >- char *dir = argv[0]; >+ char *dir; > > if (DEBUG_GTE(SEND, 1)) > rprintf(FINFO, "server_sender starting pid=%d\n", (int)getpid()); >@@ -800,7 +800,14 @@ static void do_server_sender(int f_in, int f_out, int argc, char *argv[]) > exit_cleanup(RERR_SYNTAX); > return; > } >+ if(argc == 0) >+ { >+ rprintf(FERROR, "ERROR: missing arguments to server_sender\n"); >+ exit_cleanup(RERR_SYNTAX); >+ return; >+ } > >+ dir = argv[0]; > if (!relative_paths) { > if (!change_dir(dir, CD_NORMAL)) { > rsyserr(FERROR, errno, "change_dir#3 %s failed", >-- >2.13.6 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 13104
: 13732