Gitweb:
http://git.fedorahosted.org/git/augeas.git?p=augeas.git;a=commitdiff;h=a2666e3fb5b0c976735d98f696ca5aeb13edd763
Commit: a2666e3fb5b0c976735d98f696ca5aeb13edd763
Parent: f6568ba916e08707e6bb6050eb7c643958fb1c4b
Author: David Lutterkort <[email protected]>
AuthorDate: Wed Nov 11 16:08:12 2009 -0800
Committer: David Lutterkort <[email protected]>
CommitterDate: Fri Nov 13 10:45:05 2009 -0800
* src/regexp.c (regexp_escape): treat NULL regexps as the empty regexp
---
src/regexp.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/src/regexp.c b/src/regexp.c
index 15a73af..caecce4 100644
--- a/src/regexp.c
+++ b/src/regexp.c
@@ -36,6 +36,9 @@ static const struct string *const empty_pattern =
&empty_pattern_string;
char *regexp_escape(const struct regexp *r) {
char *pat = NULL;
+ if (r == NULL)
+ return strdup("");
+
#if !HAVE_USELOCALE
char *nre = NULL;
int ret;
_______________________________________________
augeas-devel mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/augeas-devel