[MPlayer-cvslog] r37769 - trunk/sub/font_load.c

reimar subversion at mplayerhq.hu
Sat Feb 20 13:52:42 CET 2016


Author: reimar
Date: Sat Feb 20 13:52:42 2016
New Revision: 37769

Log:
font_load: check fread return value.

Modified:
   trunk/sub/font_load.c

Modified: trunk/sub/font_load.c
==============================================================================
--- trunk/sub/font_load.c	Sat Feb 20 13:51:25 2016	(r37768)
+++ trunk/sub/font_load.c	Sat Feb 20 13:52:42 2016	(r37769)
@@ -54,7 +54,8 @@ raw_file* load_raw(char *name,int verbos
     mp_msg(MSGT_OSD, MSGL_DBG2, "RAW: %s  %d x %d, %d colors\n",name,raw->w,raw->h,raw->c);
     if(raw->c){
         raw->pal=calloc(raw->c, 3);
-        fread(raw->pal,3,raw->c,f);
+        if (fread(raw->pal,3,raw->c,f) != raw->c)
+          goto err_out;
         bpp=1;
     } else {
         bpp=3;


More information about the MPlayer-cvslog mailing list