[dvblast-devel] Out of range check fix (spotted by Coverity: CID 1100931)
Julian Gardner
git at videolan.org
Thu Oct 24 08:51:06 CEST 2013
dvblast | branch: master | Julian Gardner <joolzg at btinternet.com> | Thu Oct 24 01:31:50 2013 +0200| [124d18f37ec7453154e65480e354a34b94658ce0] | committer: Georgi Chorbadzhiyski
Out of range check fix (spotted by Coverity: CID 1100931)
> http://git.videolan.org/gitweb.cgi/dvblast.git/?a=commit;h=124d18f37ec7453154e65480e354a34b94658ce0
---
en50221.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/en50221.c b/en50221.c
index 53bf80a..c30ae1b 100644
--- a/en50221.c
+++ b/en50221.c
@@ -575,7 +575,7 @@ static void SessionOpen( access_t * p_access, uint8_t i_slot,
if ( !p_sessions[i_session_id - 1].i_resource_id )
break;
}
- if ( i_session_id == MAX_SESSIONS )
+ if ( i_session_id > MAX_SESSIONS )
{
msg_Err( p_access, "too many sessions !" );
return;
@@ -633,7 +633,7 @@ static void SessionCreate( access_t * p_access, int i_slot, int i_resource_id )
if ( !p_sessions[i_session_id - 1].i_resource_id )
break;
}
- if ( i_session_id == MAX_SESSIONS )
+ if ( i_session_id > MAX_SESSIONS )
{
msg_Err( p_access, "too many sessions !" );
return;
More information about the dvblast-devel
mailing list