Skip to content

Commit 984ce8b

Browse files
committed
cmark_reference_lookup: Return NULL if reference is null string.
1 parent 138657c commit 984ce8b

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/references.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ cmark_reference *cmark_reference_lookup(cmark_reference_map *map,
9595
unsigned char *norm;
9696
unsigned int hash;
9797

98-
if (label->len > MAX_LINK_LABEL_LENGTH)
98+
if (label->len < 1 || label->len > MAX_LINK_LABEL_LENGTH)
9999
return NULL;
100100

101101
if (map == NULL)

0 commit comments

Comments
 (0)