diff --git a/src/rhosts.c b/src/rhosts.c index 387e09e..7c2ebf7 100644 --- a/src/rhosts.c +++ b/src/rhosts.c @@ -37,7 +37,7 @@ int parse_config(struct entry **entries){ j = &(*entries)[0].entrytype; char c='\0'; // Character Buffer - char buff[500]; + char buff[MAXSTRSIZE]; buff[0]='\0'; short int valtyp = CONTENTTYPE_BLANK; diff --git a/src/rhosts.h b/src/rhosts.h index e15817c..0daf83c 100644 --- a/src/rhosts.h +++ b/src/rhosts.h @@ -17,6 +17,7 @@ #define TMPDOWNLOADLOCATION "/tmp/rhostsdownload" #define HOSTSLOCATION "/etc/hosts" #define CONFIGFILE "/etc/rhosts/rhosts.cfg" +#define MAXSTRSIZE 500 #else #endif @@ -29,7 +30,7 @@ struct entry{ int entrytype; - char entry[500]; + char entry[MAXSTRSIZE]; }; int parse_config(struct entry **entries);