Magellan Linux

Contents of /trunk/sed/patches/sed-4.1.5-uclibc.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 458 - (show annotations) (download)
Thu Jan 31 19:10:16 2008 UTC (16 years, 3 months ago) by niro
File size: 897 byte(s)
-added uclibc patch

1 Submitted By: Robert Connolly <robert at linuxfromscratch dot org> (ashes)
2 Date: 2005-10-02
3 Initial Package Version: 4.1.4
4 Upstream Status: Accepted Upstream
5 Origin: http://lists.gnu.org/archive/html/bug-gnu-utils/2005-08/txtVau5I71LDV.txt
6 Description: This corrects a problem with a "Memory exhausted" error when Sed
7 is linked to uClibc 0.9.28.
8
9 diff -Naur sed-4.1.4.orig/lib/regex_internal.c sed-4.1.4/lib/regex_internal.c
10 --- sed-4.1.4.orig/lib/regex_internal.c 2005-01-28 09:07:56 +0000
11 +++ sed-4.1.4/lib/regex_internal.c 2005-08-24 03:20:28 +0000
12 @@ -885,8 +885,9 @@
13 {
14 set->alloc = size;
15 set->nelem = 0;
16 - set->elems = re_malloc (int, size);
17 - if (BE (set->elems == NULL, 0))
18 + set->elems = re_malloc (int, size); /* can be NULL if size == 0
19 + (see re_node_set_init_empty(set)) */
20 + if (BE (set->elems == NULL && size != 0, 0))
21 return REG_ESPACE;
22 return REG_NOERROR;
23 }