You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl-cvs@perl.apache.org by do...@apache.org on 2001/10/08 19:57:45 UTC

cvs commit: modperl-2.0/xs/ModPerl/Util ModPerl__Util.h

dougm       01/10/08 10:57:45

  Added:       xs/ModPerl/Util ModPerl__Util.h
  Log:
  new module for util functions
  
  Revision  Changes    Path
  1.1                  modperl-2.0/xs/ModPerl/Util/ModPerl__Util.h
  
  Index: ModPerl__Util.h
  ===================================================================
  static MP_INLINE void mpxs_ModPerl__Util_untaint(pTHX_ I32 items,
                                                   SV **MARK, SV **SP)
  {
      while (MARK <= SP) {
          SvTAINTED_off(*MARK++);
      }
  }
  
  
  

Re: cvs commit: modperl-2.0/xs/ModPerl/Util ModPerl__Util.h

Posted by Stas Bekman <st...@stason.org>.
Doug MacEachern wrote:

> On Tue, 9 Oct 2001, Stas Bekman wrote:
>  
> 
>>This hangs in Apache::Registry tests, MARK never gets incremented.
>>
> 
> right, because it (*MARK++) only happened if PL_tainting (see
> SvTAINTED_off macro).  try with the recent commit, should have been that
> way to begin with.

yup, that works, thanks :)


_____________________________________________________________________
Stas Bekman             JAm_pH      --   Just Another mod_perl Hacker
http://stason.org/      mod_perl Guide   http://perl.apache.org/guide
mailto:stas@stason.org  http://ticketmaster.com http://apacheweek.com
http://singlesheaven.com http://perl.apache.org http://perlmonth.com/


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org


Re: cvs commit: modperl-2.0/xs/ModPerl/Util ModPerl__Util.h

Posted by Doug MacEachern <do...@covalent.net>.
On Tue, 9 Oct 2001, Stas Bekman wrote:
 
> This hangs in Apache::Registry tests, MARK never gets incremented.

right, because it (*MARK++) only happened if PL_tainting (see
SvTAINTED_off macro).  try with the recent commit, should have been that
way to begin with.



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org


Re: cvs commit: modperl-2.0/xs/ModPerl/Util ModPerl__Util.h

Posted by Doug MacEachern <do...@covalent.net>.
On Tue, 9 Oct 2001, Stas Bekman wrote:
 
> This hangs in Apache::Registry tests, MARK never gets incremented.

right, because it (*MARK++) only happened if PL_tainting (see
SvTAINTED_off macro).  try with the recent commit, should have been that
way to begin with.



Re: cvs commit: modperl-2.0/xs/ModPerl/Util ModPerl__Util.h

Posted by Stas Bekman <st...@stason.org>.
dougm@apache.org wrote:

> dougm       01/10/08 10:57:45
> 
>   Added:       xs/ModPerl/Util ModPerl__Util.h
>   Log:
>   new module for util functions
>   
>   Revision  Changes    Path
>   1.1                  modperl-2.0/xs/ModPerl/Util/ModPerl__Util.h
>   
>   Index: ModPerl__Util.h
>   ===================================================================
>   static MP_INLINE void mpxs_ModPerl__Util_untaint(pTHX_ I32 items,
>                                                    SV **MARK, SV **SP)
>   {
>       while (MARK <= SP) {
>           SvTAINTED_off(*MARK++);
>       }
>   }


This hangs in Apache::Registry tests, MARK never gets incremented.

This patch fixes things. But I'm interested to know why yours doesn't work?


Index: xs/ModPerl/Util/ModPerl__Util.h
===================================================================
RCS file: /home/cvs/modperl-2.0/xs/ModPerl/Util/ModPerl__Util.h,v
retrieving revision 1.2
diff -u -r1.2 ModPerl__Util.h
--- xs/ModPerl/Util/ModPerl__Util.h	2001/10/08 23:44:17	1.2
+++ xs/ModPerl/Util/ModPerl__Util.h	2001/10/09 04:04:56
@@ -2,7 +2,8 @@
                                                   SV **MARK, SV **SP)
  {
      while (MARK <= SP) {
-        SvTAINTED_off(*MARK++);
+        SvTAINTED_off(*MARK);
+        MARK++; // cannot ++ while in SvTAINTED_off
      }
  }


-- 


_____________________________________________________________________
Stas Bekman             JAm_pH      --   Just Another mod_perl Hacker
http://stason.org/      mod_perl Guide   http://perl.apache.org/guide
mailto:stas@stason.org  http://ticketmaster.com http://apacheweek.com
http://singlesheaven.com http://perl.apache.org http://perlmonth.com/


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org


Re: cvs commit: modperl-2.0/xs/ModPerl/Util ModPerl__Util.h

Posted by Stas Bekman <st...@stason.org>.
dougm@apache.org wrote:

> dougm       01/10/08 10:57:45
> 
>   Added:       xs/ModPerl/Util ModPerl__Util.h
>   Log:
>   new module for util functions
>   
>   Revision  Changes    Path
>   1.1                  modperl-2.0/xs/ModPerl/Util/ModPerl__Util.h
>   
>   Index: ModPerl__Util.h
>   ===================================================================
>   static MP_INLINE void mpxs_ModPerl__Util_untaint(pTHX_ I32 items,
>                                                    SV **MARK, SV **SP)
>   {
>       while (MARK <= SP) {
>           SvTAINTED_off(*MARK++);
>       }
>   }


This hangs in Apache::Registry tests, MARK never gets incremented.

This patch fixes things. But I'm interested to know why yours doesn't work?


Index: xs/ModPerl/Util/ModPerl__Util.h
===================================================================
RCS file: /home/cvs/modperl-2.0/xs/ModPerl/Util/ModPerl__Util.h,v
retrieving revision 1.2
diff -u -r1.2 ModPerl__Util.h
--- xs/ModPerl/Util/ModPerl__Util.h	2001/10/08 23:44:17	1.2
+++ xs/ModPerl/Util/ModPerl__Util.h	2001/10/09 04:04:56
@@ -2,7 +2,8 @@
                                                   SV **MARK, SV **SP)
  {
      while (MARK <= SP) {
-        SvTAINTED_off(*MARK++);
+        SvTAINTED_off(*MARK);
+        MARK++; // cannot ++ while in SvTAINTED_off
      }
  }


-- 


_____________________________________________________________________
Stas Bekman             JAm_pH      --   Just Another mod_perl Hacker
http://stason.org/      mod_perl Guide   http://perl.apache.org/guide
mailto:stas@stason.org  http://ticketmaster.com http://apacheweek.com
http://singlesheaven.com http://perl.apache.org http://perlmonth.com/