]> git.baikalelectronics.ru Git - kernel.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>
Sat, 16 Feb 2019 22:42:47 +0000 (22:42 +0000)
commit1d00701de830b8d14016d6f1d09ddd89ace9e1ca
treec599abcee8b22ab95caa56f7e628026f1ed4cd8d
parentca8be8bab143b551c2257c2e53f7b2aec0741982
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: 28eb9842623c ("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