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.
Reviewed-on: http://gerrit.openafs.org/4528
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit
484b5b4cf4f88a9ddd04cdbe870d9c2959ef266c)
Change-Id: Ia1b7537d7988203bd8c0bbc619c04f5b3f9387a1
Reviewed-on: http://gerrit.openafs.org/4532
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-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 */