[FFmpeg-devel] [PATCH] ffprobe: fix use of uninitialized variable
Zhao Zhili
wantlamy at gmail.com
Sun Aug 6 10:39:07 EEST 2017
---
ffprobe.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/ffprobe.c b/ffprobe.c
index f22c4f57ad..ac9ff051fa 100644
--- a/ffprobe.c
+++ b/ffprobe.c
@@ -3328,6 +3328,7 @@ static int parse_read_interval(const char
*interval_spec,
}
interval->end = lli;
} else {
+ interval->duration_frames = 0;
ret = av_parse_time(&us, p, 1);
if (ret < 0) {
av_log(NULL, AV_LOG_ERROR, "Invalid interval end/duration
specification '%s'\n", p);
@@ -3337,6 +3338,7 @@ static int parse_read_interval(const char
*interval_spec,
}
} else {
interval->has_end = 0;
+ interval->duration_frames = 0;
}
end:
@@ -3357,7 +3359,7 @@ static int parse_read_intervals(const char
*intervals_spec)
n++;
n++;
- read_intervals = av_malloc_array(n, sizeof(*read_intervals));
+ read_intervals = av_mallocz_array(n, sizeof(*read_intervals));
if (!read_intervals) {
ret = AVERROR(ENOMEM);
goto end;
--
2.13.2
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-ffprobe-fix-use-of-uninitialized-variable.patch
Type: application/octet-stream
Size: 1279 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20170806/aeb307be/attachment.obj>
More information about the ffmpeg-devel
mailing list