Commit 0b61dfd1 authored by Eric Bollengier's avatar Eric Bollengier
Browse files

Fix org#2655 About incorrect definition of MAX_FOPTS

This triggers a stack buffer overflow bug in send_fileset. The
problem is that dird/fd_cmds.c includes findlib/find.h, which contains a
definition of MAX_FOPTS:

Thanks to Larry and Martin.
parent 72a66c14
......@@ -186,6 +186,14 @@ void InitWinAPIWrapper();
/* Use the following for strings not to be translated */
#define NT_(s) (s)
/* Maximum number of fileset options
* FileSet definitions very similar to the resource
* contained in the Director because the components
* of the structure are passed by the Director to the
* File daemon and recompiled back into this structure
*/
#define MAX_FOPTS 50
/* This should go away! ****FIXME***** */
#define MAXSTRING 500
......
......@@ -566,10 +566,6 @@ enum {
INC_KW_MAX /* Keep this last */
};
#undef MAX_FOPTS
#define MAX_FOPTS 50
/* File options structure */
struct FOPTS {
char opts[MAX_FOPTS]; /* options string */
......
......@@ -78,14 +78,6 @@ struct s_excluded_file {
char fname[1];
};
/* FileSet definitions very similar to the resource
* contained in the Director because the components
* of the structure are passed by the Director to the
* File daemon and recompiled back into this structure
*/
#undef MAX_FOPTS
#define MAX_FOPTS 30
enum {
state_none,
state_options,
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment