diff options
-rw-r--r-- | arch/sandbox/cpu/state.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/arch/sandbox/cpu/state.c b/arch/sandbox/cpu/state.c index f63cfd38ee..a4d99bade4 100644 --- a/arch/sandbox/cpu/state.c +++ b/arch/sandbox/cpu/state.c @@ -78,6 +78,10 @@ static int state_read_file(struct sandbox_state *state, const char *fname) err_read: os_close(fd); err_open: + /* + * tainted scalar, since size is obtained from the file. But we can rely + * on os_malloc() to handle invalid values. + */ os_free(state->state_fdt); state->state_fdt = NULL; |