develooper Front page | perl.perl5.porters | Postings from March 2011

Is this a tainting bug?

Thread Next
From:
Karl Williamson
Date:
March 27, 2011 12:29
Subject:
Is this a tainting bug?
Message ID:
4D8F900D.9080807@khwilliamson.com
I dont' understand enough about tainting to know if this is a bug;  in 
regexec.c there are these lines beginning at #6512:

     /* If this character is potentially in the bitmap, check it */
     if (c < 256) {
	if (ANYOF_BITMAP_TEST(n, c))
	    match = TRUE;
	else if (flags & ANYOF_NON_UTF8_LATIN1_ALL
		&& ! utf8_target
		&& ! isASCII(c))
	{
	    match = TRUE;
	}

	else if (flags & ANYOF_LOCALE) {
	    PL_reg_flags |= RF_tainted;

	    if ((flags & ANYOF_LOC_NONBITMAP_FOLD)


Note that under locale, things don't necessarily get tainted.  But when 
they aren't tainted, the code hasn't relied on anything in the locale, 
so maybe that's all right??



Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About