summaryrefslogtreecommitdiff
path: root/src/references.c
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2016-06-22 22:18:24 -0700
committerJohn MacFarlane <jgm@berkeley.edu>2016-06-22 22:18:57 -0700
commit9a8610c9715e714e40ad7a93be89985fe5371907 (patch)
treecfa3d75613926b99b1bac70fd2dfb112567d4312 /src/references.c
parentd4cb8e767ce224d31501c19fb11a220824df9bf8 (diff)
cmark_reference_lookup: Return NULL if reference is null string.
Diffstat (limited to 'src/references.c')
-rwxr-xr-xsrc/references.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/references.c b/src/references.c
index 6d31142..348de14 100755
--- a/src/references.c
+++ b/src/references.c
@@ -95,7 +95,7 @@ cmark_reference *cmark_reference_lookup(cmark_reference_map *map,
unsigned char *norm;
unsigned int hash;
- if (label->len > MAX_LINK_LABEL_LENGTH)
+ if (label->len < 1 || label->len > MAX_LINK_LABEL_LENGTH)
return NULL;
if (map == NULL)