- Commit
- 96a40c97cedeb51ab70cedd6b863388610338862
- Parent
- 64a4c3767cf5a395bfe5157dd4bc144caebf270f
- Author
- John MacFarlane <jgm@berkeley.edu>
- Date
Added a test for NULL when freeing subj->last_delim.
Noticed the need for this through fuzzing.
My personal build of CMark ✏️
Added a test for NULL when freeing subj->last_delim.
Noticed the need for this through fuzzing.
1 file changed, 1 insertion, 1 deletion
Status | File Name | N° Changes | Insertions | Deletions |
Modified | src/inlines.c | 2 | 1 | 1 |
diff --git 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); } }