From 00762ffaeb3bd3a9bd394477d53ed8b4c866b380 Mon Sep 17 00:00:00 2001 From: David Lawrence Ramsey Date: Fri, 8 Apr 2005 20:06:08 +0000 Subject: [PATCH] add comment git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2455 35c25a1d-7b9e-4130-9fde-d3aeb78583b8 --- src/utils.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/utils.c b/src/utils.c index 86d55770..4d384648 100644 --- a/src/utils.c +++ b/src/utils.c @@ -36,11 +36,13 @@ #ifdef HAVE_REGEX_H #ifdef BROKEN_REGEXEC +/* Work around a potential segfault in glibc 2.2.3's regexec(). */ int safe_regexec(const regex_t *preg, const char *string, size_t nmatch, regmatch_t pmatch[], int eflags) { if (string != NULL && *string != '\0') return regexec(preg, string, nmatch, pmatch, eflags); + return REG_NOMATCH; } #endif