[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug-diffutils] bug#26690: Acknowledgement (Crash with --ignore-matching
From: |
Marcel Böhme |
Subject: |
[bug-diffutils] bug#26690: Acknowledgement (Crash with --ignore-matching-lines) |
Date: |
Fri, 28 Apr 2017 01:32:30 +0000 |
Suggested patch:
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
diff --git a/src/diff.c b/src/diff.c
index 76851ac..9db7005 100644
--- a/src/diff.c
+++ b/src/diff.c
@@ -818,7 +818,18 @@ add_regexp (struct regexp_list *reglist, char const
*pattern)
char const *m = re_compile_pattern (pattern, patlen, reglist->buf);
if (m != 0)
- error (0, 0, "%s: %s", pattern, m);
+ {
+ error (0, 0, "%s: %s", pattern, m);
+
+ /* Recompile existing pattern if needed */
+ if (reglist->regexps)
+ {
+ m = re_compile_pattern (reglist->regexps, reglist->len,
+ reglist->buf);
+ if (m)
+ die (EXIT_TROUBLE, 0, "%s: %s", reglist->regexps, m);
+ }
+ }
else
{
char *regexps = reglist->regexps;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Best regards,
- Marcel
---
Marcel Böhme
Senior Research Fellow
TSUNAMi Security Research Centre
National University of Singapore
________________________________
Important: This email is confidential and may be privileged. If you are not the
intended recipient, please delete it and notify us immediately; you should not
copy or use it for any purpose, nor disclose its contents to any other person.
Thank you.