Currently, we more or less "trust" the configuration files to contain "sane" values. For example, if you change /vsm/tunnelslots_per_session to -42, VSM would probably crash and/or fail. We should go through our Hiveconf files, check where the parameters are used, and, if necessary, add input data validation. This bug is also related to the famous Hiveconf "metadata support" feature. The plan is to have Hiveconf support metadata, which can contain information about which values are allowed etc.
One thing to consider: Should the rangecheck be done when, say, vsmagent starts up, or scattered through out the code (say, in find_free_display)?