Radish alpha
H
rad:z3QDZAW2FAfuLvihrhiyDC9fAD8G9
HardenedBSD Package Manager
Radicle
Git
Accept empty files when parsing ucl files
Baptiste Daroussin committed 11 years ago
commit cb024b2eae1495bf2c0111a2bc372d2f946d227c
parent a4bf99d
1 file changed +4 -1
modified external/libucl/src/ucl_parser.c
@@ -1941,10 +1941,13 @@ ucl_parser_add_chunk (struct ucl_parser *parser, const unsigned char *data,
{
	struct ucl_chunk *chunk;

-
	if (data == NULL || len == 0) {
+
	if (data == NULL) {
		ucl_create_err (&parser->err, "invalid chunk added");
		return false;
	}
+
	if (len == 0) {
+
		return true;
+
	}
	if (parser->state != UCL_STATE_ERROR) {
		chunk = UCL_ALLOC (sizeof (struct ucl_chunk));
		if (chunk == NULL) {