projects
/
platform
/
upstream
/
systemd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f001a83
)
import: dkr - avoid NULL-pointer dereference
author
Tom Gundersen
<teg@jklm.no>
Mon, 25 May 2015 20:47:42 +0000
(22:47 +0200)
committer
Tom Gundersen
<teg@jklm.no>
Mon, 25 May 2015 20:47:42 +0000
(22:47 +0200)
A malformed manifest could in principle cause a NULL pointer dereference of. Check
for this and fail early.
Fixes CID 1299642.
src/import/pull-dkr.c
patch
|
blob
|
history
diff --git
a/src/import/pull-dkr.c
b/src/import/pull-dkr.c
index
40aca78
..
d7476dc
100644
(file)
--- a/
src/import/pull-dkr.c
+++ b/
src/import/pull-dkr.c
@@
-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;
}