VERBOSE (morep, ERROR, PRINTF ("too large buffer to send (%d)\n", len));
return -1;
}
- if ((index < 0) || (index >= MAX_MOREP_NUMBER) || (MOREP_list[index] == NULL)) {
+ if ((index < 0) || (index >= MAX_MOREP_NUMBER) ||
+ (MOREP_list[index] == NULL) || (!MOREP_list[index]->used)) {
VERBOSE (morep, ERROR, PRINTF ("incorrect MOREP descriptor (%d)\n", index));
return -1;
}
*msgtype = 0;
if (((index < 0) || (index >= MAX_MOREP_NUMBER)) ||
- (MOREP_list[index] == NULL)) {
+ (MOREP_list[index] == NULL) || (!MOREP_list[index]->used)) {
VERBOSE (morep, ERROR, PRINTF ("incorrect MOREP descriptor (%d)\n", index));
return -1;
}