patches/glibc/2.9/150-regex-BZ697.patch
author Titus von Boxberg <titus@v9g.de>
Tue Nov 06 17:02:06 2012 +0100 (2012-11-06)
changeset 3103 a8bf927f6e37
parent 1201 c9967a6e3b25
permissions -rw-r--r--
Makefile.in: Use only standard options compatible with BSD install

Don't use options specific to FSF's coreutils install.

Signed-off-by: Titus von Boxberg <titus@v9g.de>
Message-Id: <51587db99510a9ec08f8.1352226968@tschetwerikow.boxberg.lan>
Patchwork-Id: 197532
     1 Original patch from: gentoo/src/patchsets/glibc/2.9/0053_all_glibc-2.9-regex-BZ697.patch
     2 
     3 -= BEGIN original header =-
     4 http://sourceware.org/ml/libc-alpha/2009-01/msg00006.html
     5 
     6 From 37bdc055ceeb6b1144c07448a7210d9ab3fbb2f5 Mon Sep 17 00:00:00 2001
     7 From: Ulrich Drepper <drepper@redhat.com>
     8 Date: Thu, 8 Jan 2009 00:47:05 +0000
     9 Subject: [PATCH] (prune_impossible_nodes): Handle sifted_states[0] being NULL also if
    10  there are no backreferences.
    11 
    12 -= END original header =-
    13 
    14 diff -durN glibc-2_9.orig/posix/regexec.c glibc-2_9/posix/regexec.c
    15 --- glibc-2_9.orig/posix/regexec.c	2007-10-12 19:47:13.000000000 +0200
    16 +++ glibc-2_9/posix/regexec.c	2009-02-02 22:00:43.000000000 +0100
    17 @@ -1004,6 +1004,11 @@
    18        re_node_set_free (&sctx.limits);
    19        if (BE (ret != REG_NOERROR, 0))
    20  	goto free_return;
    21 +      if (sifted_states[0] == NULL)
    22 +	{
    23 +	  ret = REG_NOMATCH;
    24 +	  goto free_return;
    25 +	}
    26      }
    27    re_free (mctx->state_log);
    28    mctx->state_log = sifted_states;