repositories
/
deb_libcec.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
64ec6e7
)
cec: return false when SetHDMIPort() is called with invalid arguments
author
Lars Op den Kamp
<lars@opdenkamp.eu>
Fri, 27 Apr 2012 11:43:47 +0000
(13:43 +0200)
committer
Lars Op den Kamp
<lars@opdenkamp.eu>
Fri, 27 Apr 2012 11:43:47 +0000
(13:43 +0200)
src/lib/CECProcessor.cpp
patch
|
blob
|
blame
|
history
diff --git
a/src/lib/CECProcessor.cpp
b/src/lib/CECProcessor.cpp
index 51fb764c40f5ac88f35c750e2f114a09acdf10d0..5ea6bd5de62d9501daded2a4b64db06d491781fb 100644
(file)
--- a/
src/lib/CECProcessor.cpp
+++ b/
src/lib/CECProcessor.cpp
@@
-607,10
+607,9
@@
bool CCECProcessor::SetHDMIPort(cec_logical_address iBaseDevice, uint8_t iPort,
bool bReturn(false);
// limit the HDMI port range to 1-15
- if (iPort < 1)
- iPort = 1;
- if (iPort > 15)
- iPort = 15;
+ if (iPort < CEC_MIN_HDMI_PORTNUMBER ||
+ iPort > CEC_MAX_HDMI_PORTNUMBER)
+ return bReturn;
{
CLockObject lock(m_mutex);