[FFmpeg-cvslog] avcodec/jacosubdec: check strftime return value

Clément Bœsch git at videolan.org
Sun Dec 7 15:49:16 CET 2014


ffmpeg | branch: master | Clément Bœsch <u at pkh.me> | Sun Dec  7 15:46:17 2014 +0100| [6153aa2d1e41212672dfd5543a7bda9079a0160c] | committer: Clément Bœsch

avcodec/jacosubdec: check strftime return value

Fixes CID1257004

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=6153aa2d1e41212672dfd5543a7bda9079a0160c
---

 libavcodec/jacosubdec.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/libavcodec/jacosubdec.c b/libavcodec/jacosubdec.c
index 2f94956..0c97eb8 100644
--- a/libavcodec/jacosubdec.c
+++ b/libavcodec/jacosubdec.c
@@ -46,8 +46,8 @@ static int insert_datetime(AVBPrint *dst, const char *in, const char *arg)
     struct tm ltime;
 
     localtime_r(&now, &ltime);
-    strftime(buf, sizeof(buf), arg, &ltime);
-    av_bprintf(dst, "%s", buf);
+    if (strftime(buf, sizeof(buf), arg, &ltime))
+        av_bprintf(dst, "%s", buf);
     return 0;
 }
 



More information about the ffmpeg-cvslog mailing list