[vlc-commits] fbosd: fix potential buffer over-read
Rémi Duraffort
git at videolan.org
Fri Nov 11 16:03:44 CET 2011
vlc | branch: master | Rémi Duraffort <ivoire at videolan.org> | Fri Nov 11 16:03:10 2011 +0100| [5b56e1c5719e2920e1e16d17236bb8b540981e7b] | committer: Rémi Duraffort
fbosd: fix potential buffer over-read
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=5b56e1c5719e2920e1e16d17236bb8b540981e7b
---
modules/gui/fbosd.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/modules/gui/fbosd.c b/modules/gui/fbosd.c
index 375d895..ce9c369 100644
--- a/modules/gui/fbosd.c
+++ b/modules/gui/fbosd.c
@@ -1349,14 +1349,14 @@ static int OverlayCallback( vlc_object_t *p_this, char const *psz_cmd,
break;
}
/* No, then find first FREE slot */
- if( p_sys->render[i].i_state != FBOSD_STATE_RESERVED )
+ if( i == FBOSD_RENDER_MAX )
{
for( i = 0; i < FBOSD_RENDER_MAX; i++ )
{
if( p_sys->render[i].i_state == FBOSD_STATE_FREE )
break;
}
- if( p_sys->render[i].i_state != FBOSD_STATE_FREE )
+ if( i == FBOSD_RENDER_MAX )
{
msg_Warn( p_this, "render space depleated" );
return VLC_SUCCESS;
More information about the vlc-commits
mailing list