projects
/
gnulib.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
regex: re_search etc. should return -2 when memory exhausted
[gnulib.git]
/
lib
/
regexec.c
diff --git
a/lib/regexec.c
b/lib/regexec.c
index
660d25b
..
5cbfa91
100644
(file)
--- a/
lib/regexec.c
+++ b/
lib/regexec.c
@@
-475,7
+475,7
@@
re_search_stub (struct re_pattern_buffer *bufp,
/* I hope we needn't fill ther regs with -1's when no match was found. */
if (result != REG_NOERROR)
- rval =
-1
;
+ rval =
result == REG_NOMATCH ? -1 : -2
;
else if (regs != NULL)
{
/* If caller wants register contents data back, copy them. */