cmark

Unnamed repository; edit this file 'description' to name the repository.

commit 9a8610c9715e714e40ad7a93be89985fe5371907
parent d4cb8e767ce224d31501c19fb11a220824df9bf8
Author: John MacFarlane <jgm@berkeley.edu>
Date:   Wed, 22 Jun 2016 22:18:24 -0700

cmark_reference_lookup: Return NULL if reference is null string.

Diffstat:
Msrc/references.c | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git 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)