From 96a40c97cedeb51ab70cedd6b863388610338862 Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Thu, 5 Jan 2017 11:45:37 +0100 Subject: Added a test for NULL when freeing subj->last_delim. Noticed the need for this through fuzzing. --- src/inlines.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/inlines.c b/src/inlines.c index a855c5a..7263c05 100644 --- a/src/inlines.c +++ b/src/inlines.c @@ -600,7 +600,7 @@ static void process_emphasis(subject *subj, delimiter *stack_bottom) { } } // free all delimiters in list until stack_bottom: - while (subj->last_delim != stack_bottom) { + while (subj->last_delim != NULL && subj->last_delim != stack_bottom) { remove_delimiter(subj, subj->last_delim); } } -- cgit v1.2.3