summaryrefslogtreecommitdiff
path: root/libavformat/wtvdec.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2014-10-26 02:06:40 +0100
committerMichael Niedermayer <michaelni@gmx.at>2014-10-26 02:06:40 +0100
commit3b709fd912749d7731fa954cfb3aedd18d8a666a (patch)
treea03db8b7a73f30593cae44159cf17042aaf9ce15 /libavformat/wtvdec.c
parent50697ac5b2e7151b7e29299a5e36aef17695f9c4 (diff)
parent9dcf2397219ca796f0fafce2a703770d6fd09920 (diff)
downloadffmpeg-3b709fd912749d7731fa954cfb3aedd18d8a666a.tar.gz
Merge commit '9dcf2397219ca796f0fafce2a703770d6fd09920'
* commit '9dcf2397219ca796f0fafce2a703770d6fd09920': lavf: Check the return value of strftime Conflicts: libavformat/wtvdec.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/wtvdec.c')
-rw-r--r--libavformat/wtvdec.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/libavformat/wtvdec.c b/libavformat/wtvdec.c
index 5012890ef3..de3c93158c 100644
--- a/libavformat/wtvdec.c
+++ b/libavformat/wtvdec.c
@@ -389,7 +389,8 @@ static int filetime_to_iso8601(char *buf, int buf_size, int64_t value)
struct tm *tm = gmtime(&t);
if (!tm)
return -1;
- strftime(buf, buf_size, "%Y-%m-%d %H:%M:%S", tm);
+ if (!strftime(buf, buf_size, "%Y-%m-%d %H:%M:%S", tm))
+ return -1;
return 0;
}
@@ -403,7 +404,8 @@ static int crazytime_to_iso8601(char *buf, int buf_size, int64_t value)
struct tm *tm = gmtime(&t);
if (!tm)
return -1;
- strftime(buf, buf_size, "%Y-%m-%d %H:%M:%S", tm);
+ if (!strftime(buf, buf_size, "%Y-%m-%d %H:%M:%S", tm))
+ return -1;
return 0;
}
@@ -417,7 +419,8 @@ static int oledate_to_iso8601(char *buf, int buf_size, int64_t value)
struct tm *tm= gmtime(&t);
if (!tm)
return -1;
- strftime(buf, buf_size, "%Y-%m-%d %H:%M:%S", tm);
+ if (!strftime(buf, buf_size, "%Y-%m-%d %H:%M:%S", tm))
+ return -1;
return 0;
}