the exported_ap[] array. Patch from jon+amd-at-spock.org. Fixed
bug #301.
* Jonathan Chen <jon+amd@spock.org>
October 22, 2004: patch/fix to move mlock/mlockall/plock code after the
fork().
+June 29, 2005: core dump going off end of exported_ap[] array.
* David Rage <rage@ucl.ac.uk>
January 17, 2005: prevent Amd from logging 'Read-only filesystem' errors
+2005-06-30 Erez Zadok <ezk@cs.sunysb.edu>
+
+ * amd/map.c (get_next_exported_ap): Avoid running off the end of
+ the exported_ap[] array. Patch from jon+amd-at-spock.org. Fixed
+ bug #301.
+
2005-06-25 Erez Zadok <ezk@cs.sunysb.edu>
* Makefile.am (EXTRA_DIST_CONF): distribute new mtab_linux.c.
* SUCH DAMAGE.
*
*
- * $Id: map.c,v 1.53 2005/03/18 01:11:33 ezk Exp $
+ * $Id: map.c,v 1.54 2005/06/30 14:58:22 ezk Exp $
*
*/
get_next_exported_ap(int *index)
{
(*index)++;
- while (exported_ap[*index] == NULL) {
- if (*index >= exported_ap_size)
- return NULL;
+ while (*index < exported_ap_size) {
+ if (exported_ap[*index] != NULL)
+ return exported_ap[*index];
(*index)++;
}
- return exported_ap[*index];
+ return NULL;
}