[vlc-devel] commit: win32text: don't render empty strings (Pierre Ynard )

git version control git at videolan.org
Fri Sep 18 11:35:55 CEST 2009


vlc | branch: master | Pierre Ynard <linkfanel at yahoo.fr> | Fri Sep 18 11:35:15 2009 +0200| [4045a1a5f852c3abc593c6390c3cdd23fba2c1f3] | committer: Pierre Ynard 

win32text: don't render empty strings

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=4045a1a5f852c3abc593c6390c3cdd23fba2c1f3
---

 modules/misc/win32text.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/modules/misc/win32text.c b/modules/misc/win32text.c
index 89fc5f8..2c53cbf 100644
--- a/modules/misc/win32text.c
+++ b/modules/misc/win32text.c
@@ -307,6 +307,9 @@ static int RenderText( filter_t *p_filter, subpicture_region_t *p_region_out,
 
     /* Sanity check */
     if( !p_region_in || !p_region_out ) return VLC_EGENERIC;
+    if( !p_region_in->psz_text || !*p_region_in->psz_text )
+        return VLC_EGENERIC;
+
     psz_string = malloc( (strlen( p_region_in->psz_text )+1) * sizeof(TCHAR) );
     if( !psz_string )
         return VLC_ENOMEM;




More information about the vlc-devel mailing list