perl-modperl-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From do...@apache.org
Subject cvs commit: modperl-2.0/src/modules/perl modperl_callback.c
Date Thu, 23 May 2002 05:55:36 GMT
dougm       02/05/22 22:55:35

  Modified:    src/modules/perl modperl_callback.c
  Log:
  prevent possible segv with method handlers?
  
  Revision  Changes    Path
  1.50      +6 -1      modperl-2.0/src/modules/perl/modperl_callback.c
  
  Index: modperl_callback.c
  ===================================================================
  RCS file: /home/cvs/modperl-2.0/src/modules/perl/modperl_callback.c,v
  retrieving revision 1.49
  retrieving revision 1.50
  diff -u -r1.49 -r1.50
  --- modperl_callback.c	18 May 2002 01:07:16 -0000	1.49
  +++ modperl_callback.c	23 May 2002 05:55:35 -0000	1.50
  @@ -16,7 +16,12 @@
       PUSHMARK(SP);
   
       if (MpHandlerMETHOD(handler)) {
  -        GV *gv = modperl_mgv_lookup(aTHX_ handler->mgv_obj);
  +        GV *gv;
  +        if (!handler->mgv_obj) {
  +            Perl_croak(aTHX_ "panic: %s method handler object is NULL!",
  +                       handler->name);
  +        }
  +        gv = modperl_mgv_lookup(aTHX_ handler->mgv_obj);
           XPUSHs(modperl_mgv_sv(gv));
       }
   
  
  
  

Mime
View raw message