Browse Source

inpcom.c, inp_get_param_level(), bug fix, access out of bounds

pre-master-46
rlar 12 years ago
parent
commit
fefa690714
  1. 4
      src/frontend/inpcom.c

4
src/frontend/inpcom.c

@ -3525,11 +3525,11 @@ inp_get_param_level(int param_num, struct dependency *deps, int total_params)
while (deps[param_num].depends_on[index1] != NULL) {
index2 = 0;
while (index2 <= total_params &&
while (index2 < total_params &&
deps[index2].param_name != deps[param_num].depends_on[index1])
index2++;
if (index2 > total_params) {
if (index2 >= total_params) {
fprintf(stderr, "ERROR: unable to find dependency parameter for %s!\n", deps[param_num].param_name);
controlled_exit(EXIT_FAILURE);
}

Loading…
Cancel
Save