2
0
mirror of https://github.com/checkpoint-restore/criu synced 2025-08-31 06:15:24 +00:00

sanitize vma types parsing

Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
This commit is contained in:
Pavel Emelyanov
2012-03-03 19:35:10 +03:00
parent 446b6526be
commit 7b7f09e4f0
2 changed files with 28 additions and 30 deletions

View File

@@ -93,6 +93,10 @@ int parse_maps(pid_t pid, struct list_head *vma_area_list, bool use_map_files)
vma_area->vma.flags = MAP_SHARED;
else if (s == 'p')
vma_area->vma.flags = MAP_PRIVATE;
else {
pr_err("Unexpected VMA met (%c)\n", s);
goto err;
}
if (strstr(big_buffer, "[stack]")) {
vma_area->vma.status |= VMA_AREA_REGULAR | VMA_AREA_STACK;