Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorClément Bœsch <u@pkh.me>2014-12-07 17:46:17 +0300
committerClément Bœsch <u@pkh.me>2014-12-07 17:46:17 +0300
commit6153aa2d1e41212672dfd5543a7bda9079a0160c (patch)
treeddc24cc5a7ce51f780a1dfde0666bab53b3f4146 /libavcodec/jacosubdec.c
parentace91616558f189fbe84ac7f9b66167a999fcc61 (diff)
avcodec/jacosubdec: check strftime return value
Fixes CID1257004
Diffstat (limited to 'libavcodec/jacosubdec.c')
-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;
}