]> www.infradead.org Git - users/willy/linux.git/commit
eCryptfs: fix a couple type promotion bugs
authorDan Carpenter <dan.carpenter@oracle.com>
Wed, 4 Jul 2018 09:35:56 +0000 (12:35 +0300)
committerTyler Hicks <tyhicks@canonical.com>
Thu, 5 Jul 2018 14:30:40 +0000 (14:30 +0000)
commit5dcea554d5cefa6dcecd57cc2563bd48d3c892d6
tree8145bba3b5ffd2f99910eab906be4ff30131ee44
parentfc36def997cfd6cbff3eda4f82853a5c311c5466
eCryptfs: fix a couple type promotion bugs

ECRYPTFS_SIZE_AND_MARKER_BYTES is type size_t, so if "rc" is negative
that gets type promoted to a high positive value and treated as success.

Fixes: 778aeb42a708 ("eCryptfs: Cleanup and optimize ecryptfs_lookup_interpose()")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
[tyhicks: Use "if/else if" rather than "if/if"]
Cc: stable@vger.kernel.org
Signed-off-by: Tyler Hicks <tyhicks@canonical.com>
fs/ecryptfs/crypto.c