Make sure that the callback functions for h_Enumerate and
h_Enumerate_r give us back valid flags values by aborting if they
return an invalid value.
Change-Id: Id34b461d5452ac318a1714b6c3ffdaf41015995c
Reviewed-on: http://gerrit.openafs.org/4528
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
h_Release_r(list[i]);
H_UNLOCK;
/* bail out of the enumeration early */
- if (H_ENUMERATE_ISSET_BAIL(flags))
+ if (H_ENUMERATE_ISSET_BAIL(flags)) {
break;
+ } else if (flags) {
+ ViceLog(0, ("h_Enumerate got back invalid return value %d\n", flags));
+ ShutDownAndCore(PANIC);
+ }
}
free((void *)list);
} /* h_Enumerate */
if (H_ENUMERATE_ISSET_BAIL(flags)) {
h_Release_r(host); /* this might free up the host */
break;
+ } else if (flags) {
+ ViceLog(0, ("h_Enumerate_r got back invalid return value %d\n", flags));
+ ShutDownAndCore(PANIC);
}
}
h_Release_r(host); /* this might free up the host */