[MPlayer-cvslog] r30388 - trunk/subreader.c

reimar subversion at mplayerhq.hu
Fri Jan 22 22:16:54 CET 2010


Author: reimar
Date: Fri Jan 22 22:16:54 2010
New Revision: 30388

Log:
Replace strncat by av_strlcat which is easier to verify for correctness.

Modified:
   trunk/subreader.c

Modified: trunk/subreader.c
==============================================================================
--- trunk/subreader.c	Fri Jan 22 22:10:40 2010	(r30387)
+++ trunk/subreader.c	Fri Jan 22 22:16:54 2010	(r30388)
@@ -20,6 +20,7 @@
 #include "subreader.h"
 #include "stream/stream.h"
 #include "libavutil/common.h"
+#include "libavutil/avstring.h"
 
 #ifdef CONFIG_ENCA
 #include <enca.h>
@@ -990,8 +991,7 @@ static subtitle *sub_read_line_jacosub(s
 		    if (!stream_read_line(st, directive, LINE_LEN))
 			return NULL;
 		    trail_space(directive);
-		    strncat(line2, directive,
-			    (LINE_LEN > 511) ? LINE_LEN : 511);
+		    av_strlcat(line2, directive, LINE_LEN);
 		    break;
 		}
 	    default:


More information about the MPlayer-cvslog mailing list