Skip to content
Snippets Groups Projects
Commit e1bb1925 authored by rswindell's avatar rswindell
Browse files

Enforce sane "maximum" packet and bundle values.

parent 62e5d6f6
Branches
Tags
No related merge requests found
......@@ -8,7 +8,7 @@
* @format.tab-size 4 (Plain Text/Source Code File Header) *
* @format.use-tabs true (see http://www.synchro.net/ptsc_hdr.html) *
* *
* Copyright 2011 Rob Swindell - http://www.synchro.net/copyright.html *
* Copyright 2012 Rob Swindell - http://www.synchro.net/copyright.html *
* *
* This program is free software; you can redistribute it and/or *
* modify it under the terms of the GNU General Public License *
......@@ -622,6 +622,13 @@ void read_echo_cfg()
/* printf("Unrecognized line in SBBSECHO.CFG file.\n"); */
}
fclose(stream);
/* make sure we have some sane "maximum" size values here: */
if(cfg.maxpktsize<1024)
cfg.maxpktsize=DFLT_PKT_SIZE;
if(cfg.maxbdlsize<1024)
cfg.maxbdlsize=DFLT_BDL_SIZE;
printf("\n");
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment