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:
authorLimin Wang <lance.lmwang@gmail.com>2020-12-05 04:39:38 +0300
committerLimin Wang <lance.lmwang@gmail.com>2021-01-16 03:51:11 +0300
commit6696a07ac62bfec49dd488510a719367918b9f7a (patch)
tree4d518e3ea9dfd91b0d16ff36a7afa50fecfdd981 /libavutil/timecode.c
parentc2424b1f35a1c6c06f1f9fe5f77a7157ed84e1cd (diff)
avutil/timecode: fix sscanf format string with garbage at the end
Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
Diffstat (limited to 'libavutil/timecode.c')
-rw-r--r--libavutil/timecode.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavutil/timecode.c b/libavutil/timecode.c
index c1fa445d31..5106f642b9 100644
--- a/libavutil/timecode.c
+++ b/libavutil/timecode.c
@@ -252,7 +252,7 @@ int av_timecode_init_from_string(AVTimecode *tc, AVRational rate, const char *st
char c;
int hh, mm, ss, ff, flags;
- if (sscanf(str, "%d:%d:%d%c%d", &hh, &mm, &ss, &c, &ff) != 5) {
+ if (sscanf(str, "%02u:%02u:%02u%c%02u", &hh, &mm, &ss, &c, &ff) != 5) {
av_log(log_ctx, AV_LOG_ERROR, "Unable to parse timecode, "
"syntax: hh:mm:ss[:;.]ff\n");
return AVERROR_INVALIDDATA;