perl-modperl-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From do...@locus.apache.org
Subject cvs commit: modperl/src/modules/perl Apache.xs
Date Thu, 02 Mar 2000 00:51:18 GMT
dougm       00/03/01 16:51:17

  Modified:    .        Changes
               src/modules/perl Apache.xs
  Log:
  prevent possible core dump in $r->pnotes if get_module_config returns NULL
  
  Revision  Changes    Path
  1.379     +3 -0      modperl/Changes
  
  Index: Changes
  ===================================================================
  RCS file: /home/cvs/modperl/Changes,v
  retrieving revision 1.378
  retrieving revision 1.379
  diff -u -r1.378 -r1.379
  --- Changes	2000/03/01 02:14:33	1.378
  +++ Changes	2000/03/02 00:51:15	1.379
  @@ -10,6 +10,9 @@
   
   =item 1.21_01-dev
   
  +prevent possible core dump in $r->pnotes if get_module_config returns
  +NULL, thanks to Kevin Murphy for the spot
  +
   fix Apache::Status::status_cv_dump for Perl/5.6-dev
   
   use perl_get_sv("]") instead of patchlevel for $AddPerlVersion
  
  
  
  1.87      +7 -2      modperl/src/modules/perl/Apache.xs
  
  Index: Apache.xs
  ===================================================================
  RCS file: /home/cvs/modperl/src/modules/perl/Apache.xs,v
  retrieving revision 1.86
  retrieving revision 1.87
  diff -u -r1.86 -r1.87
  --- Apache.xs	2000/02/03 18:36:32	1.86
  +++ Apache.xs	2000/03/02 00:51:17	1.87
  @@ -1637,7 +1637,7 @@
       SV *val
   
       PREINIT:
  -    perl_request_config *cfg;
  +    perl_request_config *cfg = NULL;
       char *key = NULL;
       STRLEN len;
   
  @@ -1645,7 +1645,12 @@
       if(k) {
   	key = SvPV(k,len);
       }
  -    cfg = (perl_request_config*) get_module_config(r->request_config, &perl_module);
  +    cfg = (perl_request_config *)
  +      get_module_config(r->request_config, &perl_module);
  +    if (!cfg) {
  +	XSRETURN_UNDEF;
  +    }
  +
       if(!cfg->pnotes) cfg->pnotes = newHV();
       if(key) {
   	if(hv_exists(cfg->pnotes, key, len)) {
  
  
  

Mime
View raw message