mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-02-18 12:56:56 +00:00
avutil/timecode: fix sscanf format string with garbage at the end
Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
This commit is contained in:
parent
c2424b1f35
commit
6696a07ac6
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user