dougm 01/11/04 20:50:57
Modified: src/modules/perl modperl_util.c
Log:
check if @DynaLoader::dl_librefs actually has any elements
in modperl_xs_dl_handles_get() before calling apr_array_make()
Revision Changes Path
1.28 +5 -0 modperl-2.0/src/modules/perl/modperl_util.c
Index: modperl_util.c
===================================================================
RCS file: /home/cvs/modperl-2.0/src/modules/perl/modperl_util.c,v
retrieving revision 1.27
retrieving revision 1.28
diff -u -r1.27 -r1.28
--- modperl_util.c 2001/10/13 03:32:31 1.27
+++ modperl_util.c 2001/11/05 04:50:57 1.28
@@ -276,6 +276,11 @@
return NULL;
}
+ if (!AvFILL(librefs) >= 0) {
+ /* dl_librefs and dl_modules are empty */
+ return NULL;
+ }
+
handles = apr_array_make(p, AvFILL(librefs)-1, sizeof(void *));
for (i=0; i<=AvFILL(librefs); i++) {