diff options
author | John MacFarlane <jgm@berkeley.edu> | 2017-01-05 11:45:37 +0100 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2017-01-05 11:45:37 +0100 |
commit | 96a40c97cedeb51ab70cedd6b863388610338862 (patch) | |
tree | 973dfccc86491a9863f5a3ca8e9a11dfe9af17cc | |
parent | 64a4c3767cf5a395bfe5157dd4bc144caebf270f (diff) |
Added a test for NULL when freeing subj->last_delim.
Noticed the need for this through fuzzing.
-rw-r--r-- | src/inlines.c | 2 |
1 files changed, 1 insertions, 1 deletions
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); } } |