import: dkr - avoid NULL-pointer dereference
A malformed manifest could in principle cause a NULL pointer dereference of. Check for this and fail early. Fixes CID 1299642.
This commit is contained in:
@@ -864,7 +864,7 @@ static void dkr_pull_job_on_finished_v2(PullJob *j) {
|
||||
}
|
||||
|
||||
e = json_variant_value(doc, "fsLayers");
|
||||
if (!e || e->type != JSON_VARIANT_ARRAY) {
|
||||
if (!e || e->type != JSON_VARIANT_ARRAY || e->size == 0) {
|
||||
r = -EBADMSG;
|
||||
goto finish;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user