diff --git a/releasenotes.md b/releasenotes.md index 7fc411ddd..5fe7836e3 100644 --- a/releasenotes.md +++ b/releasenotes.md @@ -11,6 +11,7 @@ - Deprecated inline generic types. - Deprecated tuple / triple types. - Converting a slice to a vector/array would copy too little data. +- Crash when reading an empty 'manifest.json'. ### Stdlib changes *None yet* diff --git a/src/build/libraries.c b/src/build/libraries.c index 26a6af912..aca739d98 100644 --- a/src/build/libraries.c +++ b/src/build/libraries.c @@ -172,6 +172,10 @@ INLINE JSONObject* read_manifest(const char *lib, const char *manifest_data) { error_exit("Error on line %d reading '%s':'%s'", parser.line, lib, parser.error_message); } + if (!json) + { + error_exit("Empty 'manifest.json' for library '%s'.", lib); + } return json; }