diff options
author | David Oberhollenzer <david.oberhollenzer@sigma-star.at> | 2019-11-10 14:17:33 +0100 |
---|---|---|
committer | David Oberhollenzer <david.oberhollenzer@sigma-star.at> | 2019-11-10 14:22:53 +0100 |
commit | 46c16855b1bed2704549d834acd2e9812ff3bf1e (patch) | |
tree | 9b2e1506d6b3ccfe79bc66b14899086924555146 /tests/unittests/sysfs_mock/class/mtd/mtd0/oobsize | |
parent | 413b3c919c2c96d6e0224f86eb6d3d7ce3b79238 (diff) |
mkfs.ubifs: fscrypt: bail from encrypt_block if gen_essiv_salt fails
What originally cought my attention was that gen_essiv_salt has a
size_t return type and error paths that return -1 on failure.
Further investigation revealed that the error value is never checked
for. The encrypt_block function doesn't use the return value in any
way and simply continues onward.
Furthermore, the gen_essiv_salt function has an error case that emits
an error message but returns success state.
This patch modifes gen_essiv_salt to return an error status in all
error branches, changes the return type to ssize_t and adds a check
to encrypt_block if gen_essiv_salt fails.
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
Diffstat (limited to 'tests/unittests/sysfs_mock/class/mtd/mtd0/oobsize')
0 files changed, 0 insertions, 0 deletions