diff --git a/src/sbbs3/scfg/scfg.c b/src/sbbs3/scfg/scfg.c index bc60c8b6f4d503ed89587401ce77554548b077b3..c03c839532255611770f667c3c4135f584d2a6cb 100644 --- a/src/sbbs3/scfg/scfg.c +++ b/src/sbbs3/scfg/scfg.c @@ -670,7 +670,7 @@ Every text file section must have its own unique internal code for Synchronet to reference it by. It is helpful if this code is an abreviation of the name. */ - if(uifc.input(WIN_MID|WIN_SAV,0,0,"Text Section Internal Code",code,8 + if(uifc.input(WIN_MID|WIN_SAV,0,0,"Text Section Internal Code",code,LEN_CODE ,K_EDIT)<1) continue; if(!code_ok(code)) { @@ -738,7 +738,7 @@ This is the name of this text section. strcpy(str,cfg.txtsec[i]->name); /* save */ if(!uifc.input(WIN_MID|WIN_SAV,0,10 ,"Text File Section Name" - ,cfg.txtsec[i]->name,40,K_EDIT)) + ,cfg.txtsec[i]->name,sizeof(cfg.txtsec[i]->name)-1,K_EDIT)) strcpy(cfg.txtsec[i]->name,str); break; case 1: @@ -756,7 +756,7 @@ Synchronet to reference it by. It is helpful if this code is an abreviation of the name. */ uifc.input(WIN_MID|WIN_SAV,0,17,"Internal Code (unique)" - ,str,8,K_EDIT); + ,str,LEN_CODE,K_EDIT); if(code_ok(str)) strcpy(cfg.txtsec[i]->code,str); else { @@ -840,7 +840,7 @@ This code will be the base filename used to load the shell from your EXEC directory. e.g. A shell with an internal code of MYBBS would indicate a Baja shell file named MYBBS.BIN in your EXEC directory. */ - if(uifc.input(WIN_MID|WIN_SAV,0,0,"Command Shell Internal Code",code,8 + if(uifc.input(WIN_MID|WIN_SAV,0,0,"Command Shell Internal Code",code,LEN_CODE ,K_EDIT)<1) continue; if(!code_ok(code)) { @@ -922,7 +922,7 @@ This is the descriptive name of this command shell. strcpy(str,cfg.shell[i]->name); /* save */ if(!uifc.input(WIN_MID|WIN_SAV,0,10 ,"Command Shell Name" - ,cfg.shell[i]->name,40,K_EDIT)) + ,cfg.shell[i]->name,sizeof(cfg.shell[i]->name)-1,K_EDIT)) strcpy(cfg.shell[i]->name,str); break; case 1: @@ -944,7 +944,7 @@ EXEC directory. e.g. A shell with an internal code of MYBBS would indicate a Baja shell file named MYBBS.BIN in your EXEC directory. */ uifc.input(WIN_MID|WIN_SAV,0,17,"Internal Code (unique)" - ,str,8,K_EDIT); + ,str,LEN_CODE,K_EDIT); if(code_ok(str)) strcpy(cfg.shell[i]->code,str); else { diff --git a/src/sbbs3/scfg/scfgchat.c b/src/sbbs3/scfg/scfgchat.c index bea2c4413e5be58d3c0169b825596631f8683ab2..4ff7f52b1af31cbd98a64badebd3ed638e50c56e 100644 --- a/src/sbbs3/scfg/scfgchat.c +++ b/src/sbbs3/scfg/scfgchat.c @@ -140,7 +140,7 @@ This is the command line to execute for this external chat pager. */ strcpy(str,cfg.page[i]->cmd); if(!uifc.input(WIN_MID|WIN_SAV,0,10,"Command Line" - ,cfg.page[i]->cmd,50,K_EDIT)) + ,cfg.page[i]->cmd,sizeof(cfg.page[i]->cmd)-1,K_EDIT)) strcpy(cfg.page[i]->cmd,str); break; case 1: @@ -234,7 +234,7 @@ to it internally. This code is usually an abreviation of the chat channel name. */ if(uifc.input(WIN_MID|WIN_SAV,0,0,"Internal Code" - ,code,8,K_EDIT|K_UPPER)<1) + ,code,LEN_CODE,K_EDIT|K_UPPER)<1) continue; if(!code_ok(code)) { uifc.helpbuf=invalid_code; @@ -315,7 +315,7 @@ This is the name or description of the chat channel. */ strcpy(str,cfg.chan[i]->name); if(!uifc.input(WIN_MID|WIN_SAV,0,10,"Chat Channel Name" - ,cfg.chan[i]->name,25,K_EDIT)) + ,cfg.chan[i]->name,sizeof(cfg.chan[i]->name)-1,K_EDIT)) strcpy(cfg.chan[i]->name,str); break; case 1: @@ -329,7 +329,7 @@ channel name. */ strcpy(str,cfg.chan[i]->code); if(!uifc.input(WIN_MID|WIN_SAV,0,10,"Internal Code" - ,str,8,K_UPPER|K_EDIT)) + ,str,LEN_CODE,K_UPPER|K_EDIT)) break; if(code_ok(str)) strcpy(cfg.chan[i]->code,str); @@ -631,7 +631,7 @@ Every Guru must have its own unique code for Synchronet to refer to it internally. This code is usually an abreviation of the Guru name. */ if(uifc.input(WIN_MID|WIN_SAV,0,0,"Internal Code" - ,code,8,K_EDIT|K_UPPER)<1) + ,code,LEN_CODE,K_EDIT|K_UPPER)<1) continue; if(!code_ok(code)) { uifc.helpbuf=invalid_code; @@ -702,7 +702,7 @@ This is the name of the selected Guru. */ strcpy(str,cfg.guru[i]->name); if(!uifc.input(WIN_MID|WIN_SAV,0,10,"Guru Name" - ,cfg.guru[i]->name,25,K_EDIT)) + ,cfg.guru[i]->name,sizeof(cfg.guru[i]->name)-1,K_EDIT)) strcpy(cfg.guru[i]->name,str); break; case 1: @@ -715,7 +715,7 @@ it internally. This code is usually an abreviation of the Guru name. */ strcpy(str,cfg.guru[i]->code); if(!uifc.input(WIN_MID|WIN_SAV,0,0,"Guru Internal Code" - ,str,8,K_EDIT|K_UPPER)) + ,str,LEN_CODE,K_EDIT|K_UPPER)) break; if(code_ok(str)) strcpy(cfg.guru[i]->code,str); @@ -841,7 +841,7 @@ This is the name of the selected action set. */ strcpy(str,cfg.actset[i]->name); if(!uifc.input(WIN_MID|WIN_SAV,0,10,"Action Set Name" - ,cfg.actset[i]->name,25,K_EDIT)) + ,cfg.actset[i]->name,sizeof(cfg.actset[i]->name)-1,K_EDIT)) strcpy(cfg.actset[i]->name,str); break; case 1: diff --git a/src/sbbs3/scfg/scfgmsg.c b/src/sbbs3/scfg/scfgmsg.c index 56d940d3f496ebd014d61ee55b36884377853631..7dfa8fcfba95a535c85e881506dfc7ea1313c8c1 100644 --- a/src/sbbs3/scfg/scfgmsg.c +++ b/src/sbbs3/scfg/scfgmsg.c @@ -420,11 +420,11 @@ export the current message group into. sprintf(str,"FIDONET.NA"); if(k && k<3) if(uifc.input(WIN_MID|WIN_SAV,0,0,"Uplinks" - ,str2,40,0)<=0) { + ,str2,sizeof(str2)-1,0)<=0) { uifc.changes=q; break; } if(uifc.input(WIN_MID|WIN_SAV,0,0,"Filename" - ,str,40,K_EDIT)<=0) { + ,str,sizeof(str)-1,K_EDIT)<=0) { uifc.changes=q; break; } if(fexist(str)) { @@ -534,7 +534,7 @@ import into the current message group. else if(k==3) sprintf(str,"FIDONET.NA"); if(uifc.input(WIN_MID|WIN_SAV,0,0,"Filename" - ,str,40,K_EDIT)<=0) + ,str,sizeof(str)-1,K_EDIT)<=0) break; if((stream=fnopen(&file,str,O_RDONLY))==NULL) { uifc.msg("Open Failure"); @@ -834,7 +834,7 @@ a unique QWK system ID. */ uifc.input(WIN_MID|WIN_SAV,0,0,"BBS ID for QWK Packets" - ,str,8,K_EDIT|K_UPPER); + ,str,LEN_QWKID,K_EDIT|K_UPPER); if(code_ok(str)) strcpy(cfg.sys_id,str); else diff --git a/src/sbbs3/scfg/scfgnet.c b/src/sbbs3/scfg/scfgnet.c index 194a6158f7e14438531a87017779d2bca85530f7..635b9e1163f1f7c8988a2c3e463e230d9c268366 100644 --- a/src/sbbs3/scfg/scfgnet.c +++ b/src/sbbs3/scfg/scfgnet.c @@ -156,7 +156,7 @@ networked sub-boards. This default can be overridden on a per sub-board basis with the sub-board configuration Network Options.... */ uifc.input(WIN_MID|WIN_SAV,0,0,nulstr - ,cfg.qnet_tagline,70,K_MSG|K_EDIT); + ,cfg.qnet_tagline,sizeof(cfg.qnet_tagline)-1,K_MSG|K_EDIT); break; case 0: while(1) { @@ -206,7 +206,7 @@ This is the QWK System ID of this hub. It is used for incoming and outgoing network packets and must be accurate. */ if(uifc.input(WIN_MID|WIN_SAV,0,0 - ,"System ID",str,8,K_UPPER)<1) + ,"System ID",str,LEN_QWKID,K_UPPER)<1) continue; for(j=cfg.total_qhubs;j>i;j--) @@ -420,7 +420,7 @@ EchoMail. This origin line can be overridden on a per sub-board basis with the sub-board configuration Network Options.... */ uifc.input(WIN_MID|WIN_SAV,0,0,"* Origin" - ,cfg.origline,50,K_EDIT); + ,cfg.origline,sizeof(cfg.origline)-1,K_EDIT); break; case 3: SETHELP(WHERE); @@ -432,7 +432,7 @@ FidoNet front-end that new NetMail has been created and the messages should be re-scanned. */ uifc.input(WIN_MID|WIN_SAV,0,0,"NetMail Semaphore" - ,cfg.netmail_sem,50,K_EDIT); + ,cfg.netmail_sem,sizeof(cfg.netmail_sem)-1,K_EDIT); break; case 4: SETHELP(WHERE); @@ -444,7 +444,7 @@ FidoNet front-end that new EchoMail has been created and the messages should be re-scanned. */ uifc.input(WIN_MID|WIN_SAV,0,0,"EchoMail Semaphore" - ,cfg.echomail_sem,50,K_EDIT); + ,cfg.echomail_sem,sizeof(cfg.echomail_sem)-1,K_EDIT); break; case 5: SETHELP(WHERE); @@ -455,7 +455,7 @@ This directory is where inbound files are placed. This directory is only used when an incoming message has a file attached. */ uifc.input(WIN_MID|WIN_SAV,0,0,"Inbound Files" - ,cfg.fidofile_dir,50,K_EDIT); + ,cfg.fidofile_dir,sizeof(cfg.fidofile_dir)-1,K_EDIT); break; case 6: SETHELP(WHERE); @@ -473,7 +473,7 @@ If all EchoMail sub-boards have specified EchoMail storage directories, this option is not used at all. */ uifc.input(WIN_MID|WIN_SAV,0,0,"EchoMail Base" - ,cfg.echomail_dir,50,K_EDIT); + ,cfg.echomail_dir,sizeof(cfg.echomail_dir)-1,K_EDIT); break; case 7: SETHELP(WHERE); @@ -484,7 +484,7 @@ This is the directory where NetMail will be imported from and exported to. */ uifc.input(WIN_MID|WIN_SAV,0,0,"NetMail" - ,cfg.netmail_dir,50,K_EDIT); + ,cfg.netmail_dir,sizeof(cfg.netmail_dir)-1,K_EDIT); break; case 8: i=0; @@ -679,7 +679,7 @@ If your system is networked via PostLink or PCRelay, this should be the Site Name for your BBS. */ uifc.input(WIN_MID|WIN_SAV,0,0,"Site Name" - ,cfg.sys_psname,12,K_UPPER|K_EDIT); + ,cfg.sys_psname,sizeof(cfg.sys_psname)-1,K_UPPER|K_EDIT); break; case 2: SETHELP(WHERE); @@ -817,7 +817,7 @@ Enter your system's Internet address (hostname or IP address) here (e.g. joesbbs.com). */ uifc.input(WIN_MID|WIN_SAV,0,0,"" - ,cfg.sys_inetaddr,60,K_EDIT); + ,cfg.sys_inetaddr,sizeof(cfg.sys_inetaddr)-1,K_EDIT); break; case 1: SETHELP(WHERE); @@ -829,7 +829,7 @@ external Internet e-mail processors that new mail has been received and the message base should be re-scanned. */ uifc.input(WIN_MID|WIN_SAV,0,0,"Inbound Semaphore" - ,cfg.smtpmail_sem,50,K_EDIT); + ,cfg.smtpmail_sem,sizeof(cfg.smtpmail_sem)-1,K_EDIT); break; case 2: SETHELP(WHERE); @@ -841,7 +841,7 @@ external Internet gateways (if supported) that new mail has been created and the message base should be re-scanned. */ uifc.input(WIN_MID|WIN_SAV,0,0,"Outbound Semaphore" - ,cfg.inetmail_sem,50,K_EDIT); + ,cfg.inetmail_sem,sizeof(cfg.inetmail_sem)-1,K_EDIT); break; case 3: i=0; @@ -983,7 +983,7 @@ outgoing network packets and must be accurate. */ strcpy(str,cfg.qhub[num]->id); /* save */ if(!uifc.input(WIN_MID|WIN_SAV,0,0,"QWK Network Hub System ID" - ,cfg.qhub[num]->id,8,K_UPPER|K_EDIT)) + ,cfg.qhub[num]->id,LEN_QWKID,K_UPPER|K_EDIT)) strcpy(cfg.qhub[num]->id,str); break; case 1: @@ -1358,7 +1358,7 @@ This is the Site Name of this hub. It is used for only for reference. */ strcpy(str,cfg.phub[num]->name); /* save */ if(!uifc.input(WIN_MID|WIN_SAV,0,0,"Hub Site Name" - ,cfg.phub[num]->name,10,K_UPPER|K_EDIT)) + ,cfg.phub[num]->name,sizeof(cfg.phub[num]->name)-1,K_UPPER|K_EDIT)) strcpy(cfg.phub[num]->name,str); /* restore */ break; case 1: @@ -1370,7 +1370,7 @@ This is the command line to use to initiate a call-out to this network hub. */ uifc.input(WIN_MID|WIN_SAV,0,0,"Call-out Command" - ,cfg.phub[num]->call,50,K_EDIT); + ,cfg.phub[num]->call,sizeof(cfg.phub[num]->call)-1,K_EDIT); break; case 2: sprintf(str,"%u",cfg.phub[num]->node); diff --git a/src/sbbs3/scfg/scfgnode.c b/src/sbbs3/scfg/scfgnode.c index 597755ff9ccb934d0e67a14d1ce1d8127aaf9bb8..5b9f2afc5174c7826e524f440623bc34d69a5657 100644 --- a/src/sbbs3/scfg/scfgnode.c +++ b/src/sbbs3/scfg/scfgnode.c @@ -532,7 +532,7 @@ Remember: The %! command line specifier is an abreviation for your configured EXEC directory path. */ uifc.input(WIN_MID|WIN_SAV,0,10,"Daily Event" - ,cfg.node_daily,50,K_EDIT); + ,cfg.node_daily,sizeof(cfg.node_daily)-1,K_EDIT); break; case 6: SETHELP(WHERE); @@ -549,7 +549,7 @@ This option allows you to change the location of your control directory. The \TEXT\ suffix (sub-directory) cannot be changed or removed. */ uifc.input(WIN_MID|WIN_SAV,0,10,"Text Directory" - ,cfg.text_dir,50,K_EDIT); + ,cfg.text_dir,sizeof(cfg.text_dir)-1,K_EDIT); break; } } diff --git a/src/sbbs3/scfg/scfgsub.c b/src/sbbs3/scfg/scfgsub.c index 24770cc1d95073eff83593cda7ff7fcd3e709a5a..6f3fd304ae949b5980a038a9fa980a8858c72abe 100644 --- a/src/sbbs3/scfg/scfgsub.c +++ b/src/sbbs3/scfg/scfgsub.c @@ -1061,7 +1061,7 @@ tagline in the Networks configuration, you should enter that tagline here. If this option is left blank, the default tagline is used. */ uifc.input(WIN_MID|WIN_SAV,0,0,nulstr,cfg.sub[i]->tagline - ,63,K_MSG|K_EDIT); + ,sizeof(cfg.sub[i]->tagline)-1,K_MSG|K_EDIT); break; case 5: n=1; @@ -1150,7 +1150,7 @@ If this sub-board is part of a FidoNet EchoMail conference, this is the address used for this sub-board. Format: Zone:Net/Node[.Point] */ uifc.input(WIN_MID|WIN_SAV,0,0,"FidoNet Address" - ,str,20,K_EDIT); + ,str,25,K_EDIT); cfg.sub[i]->faddr=atofaddr(str); break; case 9: @@ -1165,7 +1165,7 @@ want to use an origin line other than the default origin line in the If this option is blank, the default origin line is used. */ uifc.input(WIN_MID|WIN_SAV,0,0,nulstr,cfg.sub[i]->origline - ,50,K_EDIT); + ,sizeof(cfg.sub[i]->origline)-1,K_EDIT); break; } } @@ -1306,7 +1306,7 @@ Use this if you wish to place the data directory for this sub-board on another drive or in another directory besides the default setting. */ uifc.input(WIN_MID|WIN_SAV,0,17,"Directory" - ,cfg.sub[i]->data_dir,50,K_EDIT); + ,cfg.sub[i]->data_dir,sizeof(cfg.sub[i]->data_dir)-1,K_EDIT); break; case 3: SETHELP(WHERE); @@ -1317,7 +1317,7 @@ This is a filename that will be created as a semaphore (signal) to an external program or event whenever a message is posted in this sub-board. */ uifc.input(WIN_MID|WIN_SAV,0,17,"Semaphore File" - ,cfg.sub[i]->post_sem,50,K_EDIT); + ,cfg.sub[i]->post_sem,sizeof(cfg.sub[i]->post_sem)-1,K_EDIT); break; } } diff --git a/src/sbbs3/scfg/scfgsys.c b/src/sbbs3/scfg/scfgsys.c index 57eb8d97b544a78d31e6ae6a60032bd17921c4cc..7d3a4aeb06767df17113b64e4f0f059b1d0c797c 100644 --- a/src/sbbs3/scfg/scfgsys.c +++ b/src/sbbs3/scfg/scfgsys.c @@ -99,7 +99,7 @@ entire system. This is the name of the BBS. */ - uifc.input(WIN_MID,0,0,"BBS Name",cfg.sys_name,40,K_EDIT); + uifc.input(WIN_MID,0,0,"BBS Name",cfg.sys_name,sizeof(cfg.sys_name)-1,K_EDIT); break; case 1: SETHELP(WHERE); @@ -109,7 +109,7 @@ This is the name of the BBS. This is the location of the BBS. The format is flexible, but it is suggested you use the City, State format for clarity. */ - uifc.input(WIN_MID,0,0,"Location",cfg.sys_location,40,K_EDIT); + uifc.input(WIN_MID,0,0,"Location",cfg.sys_location,sizeof(cfg.sys_location)-1,K_EDIT); break; case 2: SETHELP(WHERE); @@ -120,7 +120,7 @@ This is the name or alias of the system operator. This does not have to be the same as user #1. This field is used for documentary purposes only. */ - uifc.input(WIN_MID,0,0,"System Operator",cfg.sys_op,40,K_EDIT); + uifc.input(WIN_MID,0,0,"System Operator",cfg.sys_op,sizeof(cfg.sys_op)-1,K_EDIT); break; case 3: SETHELP(WHERE); @@ -132,7 +132,7 @@ sysop functions. This password should be something not easily guessed and should be kept absolutely confidential. This password must be entered at the SY: prompt. */ - uifc.input(WIN_MID,0,0,"System Password",cfg.sys_pass,40,K_EDIT|K_UPPER); + uifc.input(WIN_MID,0,0,"System Password",cfg.sys_pass,sizeof(cfg.sys_pass)-1,K_EDIT|K_UPPER); break; case 4: strcpy(opt[0],"Yes"); @@ -225,7 +225,7 @@ If you want callers to only be able to logon as New if they know a certain password, enter that password here. If you want any caller to be able to logon as New, leave this option blank. */ - uifc.input(WIN_MID,0,0,"New User Password",cfg.new_pass,40 + uifc.input(WIN_MID,0,0,"New User Password",cfg.new_pass,sizeof(cfg.new_pass)-1 ,K_EDIT|K_UPPER); break; case 8: /* Toggle Options */ @@ -1176,7 +1176,7 @@ new user information displayed to them and they are disconnected. Think of it as a password to guarantee that new users read the text displayed to them. */ - uifc.input(WIN_MID,0,0,"New User Magic Word",cfg.new_magic,20 + uifc.input(WIN_MID,0,0,"New User Magic Word",cfg.new_magic,sizeof(cfg.new_magic)-1 ,K_EDIT|K_UPPER); break; case 1: @@ -1192,7 +1192,7 @@ This option allows you to change the location of your data directory. */ strcpy(str,cfg.data_dir); if(uifc.input(WIN_MID|WIN_SAV,0,9,"Data Directory" - ,str,50,K_EDIT)>0) { + ,str,sizeof(cfg.data_dir)-1,K_EDIT)>0) { backslash(str); SAFECOPY(cfg.data_dir,str); } @@ -1206,7 +1206,7 @@ Log files will be stored in this directory. */ strcpy(str,cfg.logs_dir); if(uifc.input(WIN_MID|WIN_SAV,0,9,"Logs Directory" - ,str,50,K_EDIT)>0) { + ,str,sizeof(cfg.logs_dir)-1,K_EDIT)>0) { backslash(str); SAFECOPY(cfg.logs_dir,str); } @@ -1226,7 +1226,7 @@ This option allows you to change the location of your exec directory. */ strcpy(str,cfg.exec_dir); if(uifc.input(WIN_MID|WIN_SAV,0,9,"Exec Directory" - ,str,50,K_EDIT)>0) { + ,str,sizeof(cfg.exec_dir)-1,K_EDIT)>0) { backslash(str); SAFECOPY(cfg.exec_dir,str); } @@ -1246,7 +1246,7 @@ are assumed to be located in the `exec` directory. */ strcpy(str,cfg.mods_dir); if(uifc.input(WIN_MID|WIN_SAV,0,9,"Mods Directory" - ,str,50,K_EDIT)>0) { + ,str,sizeof(cfg.mods_dir)-1,K_EDIT)>0) { backslash(str); SAFECOPY(cfg.mods_dir,str); } @@ -1262,7 +1262,7 @@ directory that all users will be prompted to answer. */ uifc.input(WIN_MID|WIN_SAV,0,0 ,"SIF Questionnaire for User Input" - ,str,8,K_UPPER|K_EDIT); + ,str,LEN_CODE,K_UPPER|K_EDIT); if(!str[0] || code_ok(str)) strcpy(cfg.new_sif,str); else @@ -1279,7 +1279,7 @@ edit function. */ uifc.input(WIN_MID|WIN_SAV,0,0 ,"SIF Questionnaire for Reviewing User Input" - ,str,8,K_EDIT); + ,str,LEN_CODE,K_EDIT); if(!str[0] || code_ok(str)) strcpy(cfg.new_sof,str); else @@ -1473,32 +1473,32 @@ for each of the available triggers listed here. break; case 0: - uifc.input(WIN_MID|WIN_SAV,0,0,"Login Module",cfg.login_mod,8 - ,K_EDIT); + uifc.input(WIN_MID|WIN_SAV,0,0,"Login Module" + ,cfg.login_mod,sizeof(cfg.login_mod)-1,K_EDIT); break; case 1: - uifc.input(WIN_MID|WIN_SAV,0,0,"Logon Module",cfg.logon_mod,8 - ,K_EDIT); + uifc.input(WIN_MID|WIN_SAV,0,0,"Logon Module" + ,cfg.logon_mod,sizeof(cfg.logon_mod)-1,K_EDIT); break; case 2: uifc.input(WIN_MID|WIN_SAV,0,0,"Synchronize Module" - ,cfg.sync_mod,8,K_EDIT); + ,cfg.sync_mod,sizeof(cfg.sync_mod)-1,K_EDIT); break; case 3: - uifc.input(WIN_MID|WIN_SAV,0,0,"Logoff Module",cfg.logoff_mod,8 - ,K_EDIT); + uifc.input(WIN_MID|WIN_SAV,0,0,"Logoff Module" + ,cfg.logoff_mod,sizeof(cfg.logoff_mod)-1,K_EDIT); break; case 4: - uifc.input(WIN_MID|WIN_SAV,0,0,"Logout Module",cfg.logout_mod,8 - ,K_EDIT); + uifc.input(WIN_MID|WIN_SAV,0,0,"Logout Module" + ,cfg.logout_mod,sizeof(cfg.logout_mod)-1,K_EDIT); break; case 5: uifc.input(WIN_MID|WIN_SAV,0,0,"New User Module" - ,cfg.newuser_mod,8,K_EDIT); + ,cfg.newuser_mod,sizeof(cfg.newuser_mod)-1,K_EDIT); break; case 6: uifc.input(WIN_MID|WIN_SAV,0,0,"Expired User Module" - ,cfg.expire_mod,8,K_EDIT); + ,cfg.expire_mod,sizeof(cfg.expire_mod)-1,K_EDIT); break; } } @@ -1614,7 +1614,7 @@ security level from 0 to 99. The available options for each level are: case 5: uifc.input(WIN_MID|WIN_SAV,0,0 ,"Lines Allowed Per Message (Post/E-mail)" - ,ultoa(cfg.level_linespermsg[i],tmp,10),4 + ,ultoa(cfg.level_linespermsg[i],tmp,10),5 ,K_NUMBER|K_EDIT); cfg.level_linespermsg[i]=atoi(tmp); break; diff --git a/src/sbbs3/scfg/scfgxfr1.c b/src/sbbs3/scfg/scfgxfr1.c index 9dced0acdb712e9d87ad9f2a68f7952775cb5c1b..a1be618b0b8a8475155d1efde6daa0d05126ecdf 100644 --- a/src/sbbs3/scfg/scfgxfr1.c +++ b/src/sbbs3/scfg/scfgxfr1.c @@ -334,7 +334,7 @@ command line examples for a few file types. case 0: uifc.input(WIN_MID|WIN_SAV,0,0 ,"Viewable File Type Extension" - ,cfg.fview[i]->ext,3,K_EDIT); + ,cfg.fview[i]->ext,sizeof(cfg.fview[i]->ext)-1,K_EDIT); break; case 1: uifc.input(WIN_MID|WIN_SAV,0,0 @@ -453,7 +453,7 @@ listed. case 0: uifc.input(WIN_MID|WIN_SAV,0,0 ,"Testable File Type Extension" - ,cfg.ftest[i]->ext,3,K_EDIT); + ,cfg.ftest[i]->ext,sizeof(cfg.ftest[i]->ext)-1,K_EDIT); break; case 1: uifc.input(WIN_MID|WIN_SAV,0,0 @@ -463,7 +463,7 @@ listed. case 2: uifc.input(WIN_MID|WIN_SAV,0,0 ,"Working String" - ,cfg.ftest[i]->workstr,40,K_EDIT|K_MSG); + ,cfg.ftest[i]->workstr,sizeof(cfg.ftest[i]->workstr)-1,K_EDIT|K_MSG); break; case 3: uifc.savnum=2; @@ -576,7 +576,7 @@ for each file type and command line listed. case 0: uifc.input(WIN_MID|WIN_SAV,0,0 ,"Download Event Extension" - ,cfg.dlevent[i]->ext,3,K_EDIT); + ,cfg.dlevent[i]->ext,sizeof(cfg.dlevent[i]->ext)-1,K_EDIT); break; case 1: uifc.input(WIN_MID|WIN_SAV,0,0 @@ -586,7 +586,7 @@ for each file type and command line listed. case 2: uifc.input(WIN_MID|WIN_SAV,0,0 ,"Working String" - ,cfg.dlevent[i]->workstr,40,K_EDIT|K_MSG); + ,cfg.dlevent[i]->workstr,sizeof(cfg.dlevent[i]->workstr)-1,K_EDIT|K_MSG); break; case 3: uifc.savnum=2; @@ -689,7 +689,7 @@ extract the file(s). case 0: uifc.input(WIN_MID|WIN_SAV,0,0 ,"Extractable File Type Extension" - ,cfg.fextr[i]->ext,3,K_EDIT); + ,cfg.fextr[i]->ext,sizeof(cfg.fextr[i]->ext)-1,K_EDIT); break; case 1: uifc.input(WIN_MID|WIN_SAV,0,0 @@ -795,7 +795,7 @@ files from the transfer section, and more. case 0: uifc.input(WIN_MID|WIN_SAV,0,0 ,"Compressable File Type Extension" - ,cfg.fcomp[i]->ext,3,K_EDIT); + ,cfg.fcomp[i]->ext,sizeof(cfg.fcomp[i]->ext)-1,K_EDIT); break; case 1: uifc.input(WIN_MID|WIN_SAV,0,0 @@ -929,7 +929,7 @@ command line for that method blank. case 1: uifc.input(WIN_MID|WIN_SAV,0,0 ,"Protocol Name" - ,cfg.prot[i]->name,25,K_EDIT); + ,cfg.prot[i]->name,sizeof(cfg.prot[i]->name)-1,K_EDIT); break; case 2: uifc.savnum=2; diff --git a/src/sbbs3/scfg/scfgxfr2.c b/src/sbbs3/scfg/scfgxfr2.c index 47f57330fc8e24e2f15823aad6ce7174561f74d7..92d8204fb92b66ee704acb7fd855e0cd8a688bf9 100644 --- a/src/sbbs3/scfg/scfgxfr2.c +++ b/src/sbbs3/scfg/scfgxfr2.c @@ -344,7 +344,7 @@ export to. else if(k==1) sprintf(str,"FILEBONE.NA"); if(uifc.input(WIN_MID|WIN_SAV,0,0,"Filename" - ,str,40,K_EDIT)<=0) { + ,str,sizeof(str)-1,K_EDIT)<=0) { uifc.changes=q; break; } if(fexist(str)) { @@ -439,7 +439,7 @@ command: DIR /ON /AD /B > DIRS.RAW strcat(str,"dirs.raw"); } if(uifc.input(WIN_MID|WIN_SAV,0,0,"Filename" - ,str,40,K_EDIT)<=0) + ,str,sizeof(str)-1,K_EDIT)<=0) break; if((stream=fnopen(&file,str,O_RDONLY))==NULL) { uifc.msg("Open Failure"); @@ -897,7 +897,7 @@ This path can be overridden on a per file basis using Alternate File Paths. */ uifc.input(WIN_L2R|WIN_SAV,0,17,"File Path" - ,cfg.dir[i]->path,50,K_EDIT); + ,cfg.dir[i]->path,sizeof(cfg.dir[i]->path)-1,K_EDIT); break; case 9: SETHELP(WHERE); @@ -1544,7 +1544,7 @@ blank, all file extensions will be allowed to be uploaded. */ uifc.input(WIN_L2R|WIN_SAV,0,17 ,"File Extensions Allowed" - ,cfg.dir[i]->exts,40,K_EDIT); + ,cfg.dir[i]->exts,sizeof(cfg.dir[i]->exts)-1,K_EDIT); break; case 1: SETHELP(WHERE); @@ -1555,7 +1555,7 @@ Use this if you wish to place the data directory for this directory on another drive or in another directory besides the default setting. */ uifc.input(WIN_MID|WIN_SAV,0,17,"Data" - ,cfg.dir[i]->data_dir,50,K_EDIT); + ,cfg.dir[i]->data_dir,sizeof(cfg.dir[i]->data_dir)-1,K_EDIT); break; case 2: SETHELP(WHERE); @@ -1566,7 +1566,7 @@ This is a filename that will be used as a semaphore (signal) to your FidoNet front-end that new files are ready to be hatched for export. */ uifc.input(WIN_MID|WIN_SAV,0,17,"Upload Semaphore" - ,cfg.dir[i]->upload_sem,50,K_EDIT); + ,cfg.dir[i]->upload_sem,sizeof(cfg.dir[i]->upload_sem)-1,K_EDIT); break; case 3: n=0; diff --git a/src/sbbs3/scfg/scfgxtrn.c b/src/sbbs3/scfg/scfgxtrn.c index c09d94a0888842d006fa73186bd9ef378d8a6982..7695291b7492fa016b878e0e0fadfdb0534fa627 100644 --- a/src/sbbs3/scfg/scfgxtrn.c +++ b/src/sbbs3/scfg/scfgxtrn.c @@ -245,7 +245,7 @@ account information, you probably want to use an online external program configured to run as a logon event. */ uifc.input(WIN_MID|WIN_SAV,0,0,"Logon Event" - ,cfg.sys_logon,50,K_EDIT); + ,cfg.sys_logon,sizeof(cfg.sys_logon)-1,K_EDIT); break; case 1: SETHELP(WHERE); @@ -260,7 +260,7 @@ want to use an Online External Program configured to run as a logoff event. */ uifc.input(WIN_MID|WIN_SAV,0,0,"Logout Event" - ,cfg.sys_logout,50,K_EDIT); + ,cfg.sys_logout,sizeof(cfg.sys_logout)-1,K_EDIT); break; case 2: SETHELP(WHERE); @@ -271,7 +271,7 @@ This is the command line for a program that will run after the first user that logs on after midnight, logs off (regardless of what node). */ uifc.input(WIN_MID|WIN_SAV,0,0,"Daily Event" - ,cfg.sys_daily,50,K_EDIT); + ,cfg.sys_daily,sizeof(cfg.sys_daily)-1,K_EDIT); break; } } } @@ -319,7 +319,7 @@ To configure an event, select it and hit ENTER . This is the internal code for the timed event. */ - if(uifc.input(WIN_MID|WIN_SAV,0,0,"Event Internal Code",str,8 + if(uifc.input(WIN_MID|WIN_SAV,0,0,"Event Internal Code",str,LEN_CODE ,K_UPPER)<1) continue; if((cfg.event=(event_t **)REALLOC(cfg.event @@ -420,7 +420,7 @@ to reference it by. It is helpful if this code is an abreviation of the command line. */ uifc.input(WIN_MID|WIN_SAV,0,17,"Internal Code (unique)" - ,str,8,K_EDIT|K_UPPER); + ,str,LEN_CODE,K_EDIT|K_UPPER); if(code_ok(str)) strcpy(cfg.event[i]->code,str); else { @@ -443,7 +443,7 @@ If this option is not used, the current NODE's directory will be the current DOS drive/directory before the command line is executed. */ uifc.input(WIN_MID|WIN_SAV,0,10,"Directory" - ,cfg.event[i]->dir,50,K_EDIT); + ,cfg.event[i]->dir,sizeof(cfg.event[i]->dir)-1,K_EDIT); break; case 2: SETHELP(WHERE); @@ -453,7 +453,7 @@ current DOS drive/directory before the command line is executed. This is the command line to execute upon this timed event. */ uifc.input(WIN_MID|WIN_SAV,0,10,"Command" - ,cfg.event[i]->cmd,50,K_EDIT); + ,cfg.event[i]->cmd,sizeof(cfg.event[i]->cmd)-1,K_EDIT); break; case 3: @@ -811,7 +811,7 @@ refer to it internally. This code is usually an abreviation of the online program name. */ if(uifc.input(WIN_MID|WIN_SAV,0,0,"Internal Code" - ,code,8,K_EDIT|K_UPPER)<1) + ,code,LEN_CODE,K_EDIT|K_UPPER)<1) continue; if(!code_ok(code)) { uifc.helpbuf=invalid_code; @@ -1594,7 +1594,7 @@ This is the name or description of the external editor. */ strcpy(str,cfg.xedit[i]->name); if(!uifc.input(WIN_MID|WIN_SAV,0,10,"External Editor Name" - ,cfg.xedit[i]->name,40,K_EDIT)) + ,cfg.xedit[i]->name,sizeof(cfg.xedit[i]->name)-1,K_EDIT)) strcpy(cfg.xedit[i]->name,str); break; case 1: @@ -1608,7 +1608,7 @@ Synchronet to reference it by. It is helpful if this code is an abreviation of the name. */ uifc.input(WIN_MID|WIN_SAV,0,17,"Internal Code (unique)" - ,str,8,K_EDIT|K_UPPER); + ,str,LEN_CODE,K_EDIT|K_UPPER); if(code_ok(str)) strcpy(cfg.xedit[i]->code,str); else { @@ -1624,7 +1624,7 @@ abreviation of the name. This is the command line to execute when using this editor remotely. */ uifc.input(WIN_MID|WIN_SAV,0,10,"Remote" - ,cfg.xedit[i]->rcmd,50,K_EDIT); + ,cfg.xedit[i]->rcmd,sizeof(cfg.xedit[i]->rcmd)-1,K_EDIT); break; case 3: uifc.savnum=2; @@ -2020,7 +2020,7 @@ for Synchronet to reference it by. It is helpful if this code is an abreviation of the name. */ if(uifc.input(WIN_MID|WIN_SAV,0,0,"Online Program Section Internal Code" - ,code,8,K_EDIT|K_UPPER)<1) + ,code,LEN_CODE,K_EDIT|K_UPPER)<1) continue; if(!code_ok(code)) { uifc.helpbuf=invalid_code; @@ -2267,7 +2267,7 @@ This is the global control key used to execute this event. This is the command line to execute when this hot key is pressed. */ uifc.input(WIN_MID|WIN_SAV,0,10,"Command Line" - ,cfg.hotkey[i]->cmd,50,K_EDIT); + ,cfg.hotkey[i]->cmd,sizeof(cfg.hotkey[i]->cmd)-1,K_EDIT); break; } } }