mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
avformat/pjsdec: dont increase pointer when its already at the end in read_ts()
Fixes use of uninitialized memory Fixes: msan_uninit-mem_7f91f2de7764_2649_PJS_capability_tester.pjs Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
6b18a6839b
commit
b84a7330af
@ -53,7 +53,8 @@ static int64_t read_ts(char **line, int *duration)
|
||||
int64_t start, end;
|
||||
|
||||
if (sscanf(*line, "%"SCNd64",%"SCNd64, &start, &end) == 2) {
|
||||
*line += strcspn(*line, "\"") + 1;
|
||||
*line += strcspn(*line, "\"");
|
||||
*line += !!**line;
|
||||
*duration = end - start;
|
||||
return start;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user