OSDN Git Service
(root)
/
uclinux-h8
/
uclibc-ng.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9bdb97c
)
Apply patch used in sed for malloc(0)
author
Peter S. Mazinger
<ps.m@gmx.net>
Wed, 11 Jan 2006 20:16:43 +0000
(20:16 -0000)
committer
Peter S. Mazinger
<ps.m@gmx.net>
Wed, 11 Jan 2006 20:16:43 +0000
(20:16 -0000)
libc/misc/regex/regex_internal.c
patch
|
blob
|
history
diff --git
a/libc/misc/regex/regex_internal.c
b/libc/misc/regex/regex_internal.c
index
c1ee850
..
6299f54
100644
(file)
--- a/
libc/misc/regex/regex_internal.c
+++ b/
libc/misc/regex/regex_internal.c
@@
-882,8
+882,9
@@
re_node_set_alloc (re_node_set *set, int size)
{
set->alloc = size;
set->nelem = 0;
- set->elems = re_malloc (int, size);
- if (BE (set->elems == NULL, 0))
+ set->elems = re_malloc (int, size); /* can be NULL if size == 0
+ (see re_node_set_init_empty(set)) */
+ if (BE (set->elems == NULL && size != 0, 0))
return REG_ESPACE;
return REG_NOERROR;
}