lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190704170422.GA25633@luke-XPS-13>
Date:   Thu, 4 Jul 2019 10:04:22 -0700
From:   Luke Nowakowski-Krijger <lnowakow@....ucsd.edu>
To:     mchehab@...nel.org
Cc:     linux-media@...r.kernel.org, linux-kernel@...r.kernel.org,
        linux-kernel-mentees@...ts.linuxfoundation.org
Subject: [Linux-kernel-mentee, PATCH] media: dvb_frontend.h: Fix shifting
 signed 32-bit value problem

Fix DVBFE_ALGO_RECOVERY and DVBFE_ALGO_SEARCH_ERROR to use U cast which
fixes undefined behavior error by certain compilers. 

Signed-off-by: Luke Nowakowski-Krijger <lnowakow@....ucsd.edu>
---
 include/media/dvb_frontend.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/include/media/dvb_frontend.h b/include/media/dvb_frontend.h
index f05cd7b94a2c..472fe5871d94 100644
--- a/include/media/dvb_frontend.h
+++ b/include/media/dvb_frontend.h
@@ -144,7 +144,7 @@ enum dvbfe_algo {
 	DVBFE_ALGO_HW			= (1 <<  0),
 	DVBFE_ALGO_SW			= (1 <<  1),
 	DVBFE_ALGO_CUSTOM		= (1 <<  2),
-	DVBFE_ALGO_RECOVERY		= (1 << 31)
+	DVBFE_ALGO_RECOVERY		= (1U << 31)
 };
 
 /**
@@ -175,7 +175,7 @@ enum dvbfe_search {
 	DVBFE_ALGO_SEARCH_FAILED	= (1 <<  2),
 	DVBFE_ALGO_SEARCH_INVALID	= (1 <<  3),
 	DVBFE_ALGO_SEARCH_AGAIN		= (1 <<  4),
-	DVBFE_ALGO_SEARCH_ERROR		= (1 << 31),
+	DVBFE_ALGO_SEARCH_ERROR		= (1U << 31),
 };
 
 /**
-- 
2.20.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ