From 6153aa2d1e41212672dfd5543a7bda9079a0160c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20B=C5=93sch?= Date: Sun, 7 Dec 2014 15:46:17 +0100 Subject: [PATCH] avcodec/jacosubdec: check strftime return value Fixes CID1257004 --- libavcodec/jacosubdec.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libavcodec/jacosubdec.c b/libavcodec/jacosubdec.c index 2f949564d5..0c97eb86c0 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, <ime); - strftime(buf, sizeof(buf), arg, <ime); - av_bprintf(dst, "%s", buf); + if (strftime(buf, sizeof(buf), arg, <ime)) + av_bprintf(dst, "%s", buf); return 0; }