summaryrefslogtreecommitdiffstats
path: root/init.c
diff options
context:
space:
mode:
authorKevin McCarthy <kevin@8t8.us>2020-07-15 19:47:11 -0700
committerKevin McCarthy <kevin@8t8.us>2020-07-19 13:43:08 -0700
commit62fab7bd4a6d143ed98a7fccc5bd37cfbcb012eb (patch)
treedf750292cd7dc84c40172e0191e030a681030384 /init.c
parent9bb7acf736fd575b41560e8b837072299df4af0c (diff)
Ensure a blackslash inside backquotes doesn't skip past eos.
I'm not sure if this is possible because of the way the input is read by the muttrc parser, but fix the logic to ensure it can't happen.
Diffstat (limited to 'init.c')
-rw-r--r--init.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/init.c b/init.c
index 9c0a3946..fa6be9e0 100644
--- a/init.c
+++ b/init.c
@@ -236,7 +236,12 @@ int mutt_extract_token (BUFFER *dest, BUFFER *tok, int flags)
{
/* skip any quoted chars */
if (*pc == '\\')
- pc += 2;
+ {
+ if (*(pc+1))
+ pc += 2;
+ else
+ pc = NULL;
+ }
}
} while (pc && *pc != '`');
if (!pc)