aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec
diff options
context:
space:
mode:
authorClément Bœsch <u@pkh.me>2014-12-07 15:46:17 +0100
committerClément Bœsch <u@pkh.me>2014-12-07 15:46:17 +0100
commit6153aa2d1e41212672dfd5543a7bda9079a0160c (patch)
treeddc24cc5a7ce51f780a1dfde0666bab53b3f4146 /libavcodec
parentace91616558f189fbe84ac7f9b66167a999fcc61 (diff)
downloadffmpeg-6153aa2d1e41212672dfd5543a7bda9079a0160c.tar.gz
avcodec/jacosubdec: check strftime return value
Fixes CID1257004
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/jacosubdec.c4
1 files 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, &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;
}