Added MAXSTRSIZE

To unify the string buffer sizes
stable
Justin Reichardt 2021-08-26 10:37:44 -05:00
parent 6ffc10a91e
commit 89a122ed16
2 changed files with 3 additions and 2 deletions

View File

@ -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;

View File

@ -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);