mirror of
https://mirror.skon.top/https://github.com/FFmpeg/FFmpeg
synced 2026-04-20 21:00:41 +08:00
avformat/lrcdec: use av_sscanf to avoid possible locale issues
Signed-off-by: Kacper Michajłow <kasper93@gmail.com>
This commit is contained in:
@@ -88,7 +88,7 @@ static int64_t read_ts(const char *p, int64_t *start)
|
||||
if(p[offset] != '[') {
|
||||
return 0;
|
||||
}
|
||||
int ret = sscanf(p, "%2[[-]%"SCNu32":%lf]", prefix, &mm, &ss);
|
||||
int ret = av_sscanf(p, "%2[[-]%"SCNu32":%lf]", prefix, &mm, &ss);
|
||||
if (ret != 3 || prefix[0] != '[' || ss < 0 || ss > 60) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user