[vlc-devel] commit: svg.c: check fread return value (Olivier Aubert )

git version control git at videolan.org
Fri Aug 8 19:03:46 CEST 2008


vlc | branch: master | Olivier Aubert <olivier.aubert at liris.cnrs.fr> | Fri Aug  8 18:48:08 2008 +0200| [040eab45bbee76f6eaa3be2b714f0c8b623c1747] | committer: Olivier Aubert 

svg.c: check fread return value

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

 modules/misc/svg.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/modules/misc/svg.c b/modules/misc/svg.c
index d601cd7..296e7cc 100644
--- a/modules/misc/svg.c
+++ b/modules/misc/svg.c
@@ -206,7 +206,10 @@ static char *svg_GetTemplate( vlc_object_t *p_this )
                     return NULL;
                 }
                 memset( psz_template, 0, s.st_size + 1 );
-                fread( psz_template, s.st_size, 1, file );
+                if(! fread( psz_template, s.st_size, 1, file ) )
+                {
+                    msg_Dbg( p_this, "No data read from template." );
+                }
             }
             fclose( file );
         }




More information about the vlc-devel mailing list