getdata: increase max number of shared networks

Anders & Thor Eivind reported dhcpd-pools to mess console and
crash at the end of execution. Reason was missing boundary check.
The fix this time is more of less just a increase to max numbers.
That will work ot some extent.

The memory allocations has to be made fully dynamic, but that is
a little bit difficult with the way default.h and parse_config
are working. Basically problem is globals gone crazy & re-entrant
issue with parse function. The true fix to the issue will have to
wait for complete redesign of internals of the command.

Reported-by: Anders Lstad <ala@nextgentel.com>
Reported-by: Thor Eivind Brantzeg <tbr@nextgentel.com>
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
This commit is contained in:
Sami Kerola 2011-04-05 21:10:46 +02:00
parent d75927df39
commit 5cbe8d07fb
2 changed files with 11 additions and 4 deletions

View file

@ -22,10 +22,10 @@
static const int MAXLEN = 1024;
/* Total number of characters in all shared network names */
static const int SHARED_NETWORKS_NAMES = 24576;
static const int SHARED_NETWORKS_NAMES = 65536;
/* Maximum number of shared networks */
static const int SHARED_NETWORKS = 1024;
static const int SHARED_NETWORKS = 8192;
/* Maximum number of ranges */
static const unsigned int RANGES = 65536;