ret = -EINVAL;
goto error;
}
+
+ if (lum->u.filter.reloc_offset > lum->u.filter.data_size - 1) {
+ ERR("Filter reloc offset %u is not within data\n",
+ lum->u.filter.reloc_offset);
+ ret = -EINVAL;
+ goto error;
+ }
+
bytecode = zmalloc(sizeof(*bytecode) + lum->u.filter.data_size);
if (!bytecode) {
ret = -ENOMEM;
ret = ftruncate(wait_shm_fd, mmap_size);
if (ret) {
PERROR("ftruncate");
- exit(EXIT_FAILURE);
+ _exit(EXIT_FAILURE);
}
- exit(EXIT_SUCCESS);
+ _exit(EXIT_SUCCESS);
}
/*
* For local shm, we need to have rw access to accept
*/
if (!sock_info->global && errno != EACCES) {
ERR("Error opening shm %s", sock_info->wait_shm_path);
- exit(EXIT_FAILURE);
+ _exit(EXIT_FAILURE);
}
/*
* The shm exists, but we cannot open it RW. Report
* success.
*/
- exit(EXIT_SUCCESS);
+ _exit(EXIT_SUCCESS);
} else {
return -1;
}