From 7f240e6aa9f5596a129474ba6294875dfe7ae264 Mon Sep 17 00:00:00 2001
From: Peter Stephenson
Date: Tue, 21 Dec 2021 10:31:26 +0000
Subject: 49658: Fix NULL reference in match code.
A test when acquiring the replacement pattern match in the globbing
code erroneously allowed the use of a NULL pointer. This appears to
be an unnecessary test case added alongside other surgery back in 2008.
---
Src/glob.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
(limited to 'Src')
diff --git a/Src/glob.c b/Src/glob.c
index bee890caf..375671cea 100644
--- a/Src/glob.c
+++ b/Src/glob.c
@@ -2549,7 +2549,7 @@ get_match_ret(Imatchdata imd, int b, int e)
e += add;
/* Everything now refers to metafied lengths. */
- if (replstr || (fl & SUB_LIST)) {
+ if (replstr) {
if (fl & SUB_DOSUBST) {
replstr = dupstring(replstr);
singsub(&replstr);
--
cgit 1.4.1