rpms/boost/F-7 boost-regex.patch,NONE,1.1 boost.spec,1.35,1.36

Petr Machata (pmachata) fedora-extras-commits at redhat.com
Wed Jan 16 20:42:43 UTC 2008


Author: pmachata

Update of /cvs/pkgs/rpms/boost/F-7
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv5899

Modified Files:
	boost.spec 
Added Files:
	boost-regex.patch 
Log Message:
- Fixes for boost.regex.


boost-regex.patch:

--- NEW FILE boost-regex.patch ---
--- ./boost/regex/v4/basic_regex_parser.hpp.orig	2008-01-16 21:09:57.000000000 +0100
+++ ./boost/regex/v4/basic_regex_parser.hpp	2008-01-16 21:08:30.000000000 +0100
@@ -727,7 +727,8 @@
          ++m_position;
       }
    }
-   if(0 == this->m_last_state)
+   if(0 == this->m_last_state
+      || this->m_last_state->type == syntax_element_assert_backref)
    {
       fail(regex_constants::error_badrepeat, ::boost::re_detail::distance(m_base, m_position));
       return false;
@@ -767,6 +768,7 @@
       case syntax_element_restart_continue:
       case syntax_element_jump:
       case syntax_element_startmark:
+      case syntax_element_backstep:
          // can't legally repeat any of the above:
          fail(regex_constants::error_badrepeat, m_position - m_base);
          return false;
@@ -1853,6 +1855,7 @@
    if(markid == -4)
    {
       re_syntax_base* b = this->getaddress(expected_alt_point);
+      // Make sure we have exactly one alternative following this state:
       if(b->type != syntax_element_alt)
       {
          re_alt* alt = static_cast<re_alt*>(this->insert_state(expected_alt_point, syntax_element_alt, sizeof(re_alt)));
@@ -1863,6 +1866,15 @@
          fail(regex_constants::error_bad_pattern, m_position - m_base);
          return false;
       }
+      // check for invalid repetition of next state:
+      b = this->getaddress(expected_alt_point);
+      b = this->getaddress(static_cast<re_alt*>(b)->next.i, b);
+      if((b->type != syntax_element_assert_backref)
+         && (b->type != syntax_element_startmark))
+      {
+         fail(regex_constants::error_badrepeat, m_position - m_base);
+         return false;
+      }
    }
    //
    // append closing parenthesis state:


Index: boost.spec
===================================================================
RCS file: /cvs/pkgs/rpms/boost/F-7/boost.spec,v
retrieving revision 1.35
retrieving revision 1.36
diff -u -r1.35 -r1.36
--- boost.spec	19 Nov 2007 18:25:53 -0000	1.35
+++ boost.spec	16 Jan 2008 20:42:10 -0000	1.36
@@ -1,7 +1,7 @@
 Name: boost
 Summary: The Boost C++ Libraries
 Version: 1.33.1
-Release: 14%{?dist}
+Release: 15%{?dist}
 License: Boost Software License (GPL-Compatible, Free Software License)
 URL: http://www.boost.org/
 Group: System Environment/Libraries
@@ -29,6 +29,7 @@
 Patch8: boost-cxxflags-debug.patch
 Patch9: boost-python-vs-x86-64.patch
 Patch10: boost-opt.patch
+Patch11: boost-regex.patch
 
 %description
 Boost provides free peer-reviewed portable C++ source libraries.  The
@@ -80,6 +81,7 @@
 %patch8 -p0
 %patch9 -p0
 %patch10 -p0
+%patch11 -p0
 
 %build
 #build bjam
@@ -185,6 +187,9 @@
 %doc %{_docdir}/boost-%{version}
 
 %changelog
+* Wed Jan 16 2008 Petr Machata <pmachata at redhat.com> - 1.33.1-15
+- Fixes for boost.regex.
+
 * Mon Nov 19 2007 Petr Machata <pmachata at redhat.com> - 1.33.1-14
 - Apply/testsuite ambiguous option patch from James Philbin
 - Resolves: #369581




More information about the fedora-extras-commits mailing list