commit | 94f6ce838c6a903ef5d0251f061a3af1816b4c50 | [log] [tgz] |
---|---|---|
author | Nick Wellnhofer <wellnhofer@aevum.de> | Thu Jun 08 22:36:09 2017 +0200 |
committer | Nick Wellnhofer <wellnhofer@aevum.de> | Sat Jun 10 17:42:04 2017 +0200 |
tree | d5b26896ab758730a9a031b806b93d7894001607 | |
parent | 91e549678019a14cb6df4a1b58ce5681d0b16264 [diff] [blame] |
Allow zero sized memory input buffers Useful for a fuzz target I'm working on.
diff --git a/buf.c b/buf.c index 07922ff..3b76018 100644 --- a/buf.c +++ b/buf.c
@@ -231,7 +231,7 @@ xmlBufCreateStatic(void *mem, size_t size) { xmlBufPtr ret; - if ((mem == NULL) || (size == 0)) + if (mem == NULL) return(NULL); ret = (xmlBufPtr) xmlMalloc(sizeof(xmlBuf));