summaryrefslogtreecommitdiff
path: root/sv.h
diff options
context:
space:
mode:
authorPerl 5 Porters <perl5-porters@africa.nicoh.com>1996-09-20 15:38:57 -0400
committerAndy Dougherty <doughera@lafcol.lafayette.edu>1996-09-20 15:38:57 -0400
commit51594c39ec0a5df8dda24c63498418e94d9787e1 (patch)
tree14fe92d4f3a3d5c9c31884e0f49e76afd5552c71 /sv.h
parent16660edb8096eecedc92b4cfa57f100a175c7962 (diff)
downloadperl-51594c39ec0a5df8dda24c63498418e94d9787e1.tar.gz
perl 5.003_06: sv.h
Date: Thu, 19 Sep 1996 11:58:22 -0400 From: "Randy J. Ray" <rjray@uswest.com> Subject: Patch: Untaint FH flag and clean DATA handles This patch adds a IOf_UNTAINT flag in sv.h, as one of the possibles on an xpvio->xio_flags struct member. It is used to mark the given file handle as a clean source, even when tainting is turned on. There are also patches to pp_sys.c in pp_sysread to check this flag before tainting data, and in pp_hot.c in do_readline for the same reason. Lastly, it patches toke.c to automatically set this flag on on a __DATA__ filehandle. The creation of the $pack::DATA pseudo-filehandle is already checked against running under eval, so this should not introduce any insecurity. This patch *does not*: * Add the "untaint" keyword. Date: Fri, 20 Sep 1996 15:38:57 -0400 From: Gurusamy Sarathy <gsar@engin.umich.edu> Subject: Re: "Attempt to free non-existent shared string"? (with patch) I found a subtle problem with the lazydelete mechanism (which is used to postpone the delete of a entry that may be getting iterated over). I was using the HeKLEN slot to hold the hint, but the real HeKLEN is needed later to call unsharepvn(). This means that only magical hash entries can use the HeKLEN slot to hold flags. Here's a tested patch against 5.00305 that fixes the problem. The patch simply moves the LAZYDEL hint to become a SV-level private flag.
Diffstat (limited to 'sv.h')
-rw-r--r--sv.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/sv.h b/sv.h
index 710664c912..47a9fd39d8 100644
--- a/sv.h
+++ b/sv.h
@@ -130,6 +130,7 @@ struct io {
#define SVpbm_TAIL 0x20000000
#define SVphv_SHAREKEYS 0x20000000 /* keys live on shared string table */
+#define SVphv_LAZYDEL 0x40000000 /* entry in xhv_eiter must be deleted */
#ifdef OVERLOAD
#define SVpgv_AM 0x40000000
@@ -269,6 +270,7 @@ struct xpvio {
#define IOf_START 2 /* check for null ARGV and substitute '-' */
#define IOf_FLUSH 4 /* this fp wants a flush after write op */
#define IOf_DIDTOP 8 /* just did top of form */
+#define IOf_UNTAINT 16 /* consider this fp (and it's data) "safe" */
/* The following macros define implementation-independent predicates on SVs. */