projects
/
project
/
procd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
aed7fb3
)
jail: fix segfault with len(uidmap/gidmap) > 1
author
Daniel Golle
<daniel@makrotopia.org>
Sun, 12 Jul 2020 16:36:05 +0000
(17:36 +0100)
committer
Daniel Golle
<daniel@makrotopia.org>
Mon, 13 Jul 2020 11:14:49 +0000
(12:14 +0100)
Allocate enough memory for all uidmap/gidmap entries.
Fixes: ea7a790 ("jail: add support for running OCI bundle")
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
jail/jail.c
patch
|
blob
|
history
diff --git
a/jail/jail.c
b/jail/jail.c
index 8a2d890dcab7a56fdd93920c6a7950a1745b432a..aa9285c88dc896743a11583fc0dd20a71c59ef56 100644
(file)
--- a/
jail/jail.c
+++ b/
jail/jail.c
@@
-1105,7
+1105,7
@@
static int parseOCIuidgidmappings(struct blob_attr *msg, bool is_gidmap)
}
/* allocate combined mapping string */
- map = calloc(1 + len, sizeof(char));
+ map = calloc(1 +
total
len, sizeof(char));
if (!map)
return ENOMEM;