Searched hist:"68697 bf5fb3e7ef39cb5817ced1eb813f2f51f77" (Results 1 – 1 of 1) sorted by relevance
| /optee_os/core/tee/ |
| H A D | fs_dirfile.c | 68697bf5fb3e7ef39cb5817ced1eb813f2f51f77 Thu May 27 10:46:16 UTC 2021 Jens Wiklander <jens.wiklander@linaro.org> core: fix tee_fs_dirfile_get_tmp() coverity warning
In tee_fs_dirfile_get_tmp() dirh->files is checked to be not NULL leading but at another place dirh->nbits is checked instead before accessing dirh->files. Both checks are OK since dirh->files mustn't be NULL if dirh->nbits is larger than 0.
This confuses coverity to emit a warning, so change the function to check dirh->nbits instead.
This fixes coverity scan: CID 1501821 (#1 of 1): Dereference after null check (FORWARD_NULL)
Acked-by: Jerome Forissier <jerome@forissier.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
|