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

git version control git at videolan.org
Sat Sep 19 00:50:42 CEST 2009


vlc | branch: 1.0-bugfix | Pierre Ynard <linkfanel at yahoo.fr> | Fri Sep 18 11:35:15 2009 +0200| [57c556170e74aa9bdf14301244a89d2e4ad2106e] | committer: Pierre Ynard 

win32text: don't render empty strings
(cherry picked from commit 4045a1a5f852c3abc593c6390c3cdd23fba2c1f3)

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

 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 bfb9fff..27e12f8 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