Commit 21d6cc9dce4f12b6090948d913d2419f84a498f5

Martin Mitas 2018-04-12T12:03:18

md2html.c: Fix possible overflow in membuf_grow().

diff --git a/md2html/md2html.c b/md2html/md2html.c
index 6253bbf..bad4be5 100644
--- a/md2html/md2html.c
+++ b/md2html/md2html.c
@@ -52,8 +52,8 @@ static int want_stat = 0;
 
 struct membuffer {
     char* data;
-    MD_SIZE asize;
-    MD_SIZE size;
+    size_t asize;
+    size_t size;
 };
 
 static void
@@ -76,7 +76,7 @@ membuf_fini(struct membuffer* buf)
 }
 
 static void
-membuf_grow(struct membuffer* buf, MD_SIZE new_asize)
+membuf_grow(struct membuffer* buf, size_t new_asize)
 {
     buf->data = realloc(buf->data, new_asize);
     if(buf->data == NULL) {