Commit 8689713c authored by deuce's avatar deuce
Browse files

Make app path variables MAX_PATH+1 (Leave room for the \0)

parent 35c1c45f
......@@ -80,7 +80,7 @@ void free_list(struct bbslist **list, int listcount)
void read_item(FILE *listfile, struct bbslist *entry, char *bbsname, int id, int type)
{
BOOL dumb;
char home[MAX_PATH];
char home[MAX_PATH+1];
get_syncterm_filename(home, sizeof(home), SYNCTERM_DEFAULT_TRANSFER_PATH, FALSE);
if(bbsname != NULL)
......@@ -489,7 +489,7 @@ void del_bbs(char *listpath, struct bbslist *bbs)
void change_settings(void)
{
char inipath[MAX_PATH];
char inipath[MAX_PATH+1];
FILE *inifile;
str_list_t inicontents;
char opts[4][80];
......@@ -594,8 +594,8 @@ struct bbslist *show_bbslist(int mode)
int at_settings=0;
struct mouse_event mevent;
struct bbslist defaults;
char shared_list[MAX_PATH];
char listpath[MAX_PATH];
char shared_list[MAX_PATH+1];
char listpath[MAX_PATH+1];
if(init_uifc(TRUE, TRUE))
return(NULL);
......
......@@ -51,8 +51,8 @@ struct bbslist {
int reversed;
int screen_mode;
int nostatus;
char dldir[MAX_PATH];
char uldir[MAX_PATH];
char dldir[MAX_PATH+1];
char uldir[MAX_PATH+1];
int loglevel;
int bpsrate;
int music;
......
......@@ -33,8 +33,8 @@ void free_font_files(struct font_files *ff)
void save_font_files(struct font_files *fonts)
{
FILE *inifile;
char inipath[MAX_PATH];
char newfont[MAX_PATH];
char inipath[MAX_PATH+1];
char newfont[MAX_PATH+1];
char *fontid;
str_list_t ini_file;
str_list_t fontnames;
......@@ -82,8 +82,8 @@ void save_font_files(struct font_files *fonts)
struct font_files *read_font_files(int *count)
{
FILE *inifile;
char inipath[MAX_PATH];
char fontpath[MAX_PATH];
char inipath[MAX_PATH+1];
char fontpath[MAX_PATH+1];
char *fontid;
str_list_t fonts;
struct font_files *ret=NULL;
......
......@@ -71,7 +71,7 @@ void parse_url(char *url, struct bbslist *bbs, int dflt_conn_type, int force_def
{
char *p1, *p2, *p3;
struct bbslist *list[MAX_OPTS+1];
char path[MAX_PATH];
char path[MAX_PATH+1];
char listpath[MAX_PATH+1];
int listcount=0, i;
......@@ -266,7 +266,7 @@ char *get_syncterm_filename(char *fn, int fnlen, int type, int shared)
void load_settings(struct syncterm_settings *set)
{
FILE *inifile;
char inipath[MAX_PATH];
char inipath[MAX_PATH+1];
get_syncterm_filename(inipath, sizeof(inipath), SYNCTERM_PATH_INI, FALSE);
inifile=fopen(inipath,"r");
......@@ -281,13 +281,13 @@ int main(int argc, char **argv)
{
struct bbslist *bbs=NULL;
struct text_info txtinfo;
char str[MAX_PATH];
char drive[MAX_PATH];
char path[MAX_PATH];
char fname[MAX_PATH];
char ext[MAX_PATH];
char str[MAX_PATH+1];
char drive[MAX_PATH+1];
char path[MAX_PATH+1];
char fname[MAX_PATH+1];
char ext[MAX_PATH+1];
/* Command-line parsing vars */
char url[MAX_PATH];
char url[MAX_PATH+1];
char *p1;
char *p2;
char *p3;
......
......@@ -523,7 +523,7 @@ void zmodem_upload(FILE *fp, char *path);
void begin_upload(char *uldir, BOOL autozm)
{
char str[MAX_PATH*2];
char str[MAX_PATH*2+1];
char path[MAX_PATH+1];
int result;
int i;
......
Markdown is supported
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