Changeset View
Changeset View
Standalone View
Standalone View
head/multimedia/mythtv/files/patch-CVE-2017-14225
Property | Old Value | New Value |
---|---|---|
fbsd:nokeywords | null | yes \ No newline at end of property |
svn:eol-style | null | native \ No newline at end of property |
svn:mime-type | null | text/plain \ No newline at end of property |
From 726133b6d2cd8f5f43b5af536024d8e02791d8cf Mon Sep 17 00:00:00 2001 | |||||
From: Michael Niedermayer <michael@niedermayer.cc> | |||||
Date: Tue, 22 Aug 2017 11:02:38 +0200 | |||||
Subject: [PATCH] ffprobe: Fix null pointer dereference with color primaries | |||||
Found-by: AD-lab of venustech | |||||
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> | |||||
(cherry picked from commit 837cb4325b712ff1aab531bf41668933f61d75d2) | |||||
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> | |||||
(cherry picked from commit b2c39fcc3c0749490dc93bca80f56724878b55fe) | |||||
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> | |||||
--- | |||||
ffprobe.c | 15 +++++++++++---- | |||||
1 file changed, 11 insertions(+), 4 deletions(-) | |||||
diff --git ffprobe.c ffprobe.c | |||||
index 79fe296489d..703304a8c0f 100644 | |||||
--- external/FFmpeg/ffprobe.c | |||||
+++ external/FFmpeg/ffprobe.c | |||||
@@ -1789,6 +1789,16 @@ static void print_pkt_side_data(WriterContext *w, | |||||
writer_print_section_footer(w); | |||||
} | |||||
+static void print_primaries(WriterContext *w, enum AVColorPrimaries color_primaries) | |||||
+{ | |||||
+ const char *val = av_color_primaries_name(color_primaries); | |||||
+ if (!val || color_primaries == AVCOL_PRI_UNSPECIFIED) { | |||||
+ print_str_opt("color_primaries", "unknown"); | |||||
+ } else { | |||||
+ print_str("color_primaries", val); | |||||
+ } | |||||
+} | |||||
+ | |||||
static void show_packet(WriterContext *w, InputFile *ifile, AVPacket *pkt, int packet_idx) | |||||
{ | |||||
char val_str[128]; | |||||
@@ -2258,10 +2268,7 @@ static int show_stream(WriterContext *w, AVFormatContext *fmt_ctx, int stream_id | |||||
else | |||||
print_str_opt("color_transfer", av_color_transfer_name(par->color_trc)); | |||||
- if (par->color_primaries != AVCOL_PRI_UNSPECIFIED) | |||||
- print_str("color_primaries", av_color_primaries_name(par->color_primaries)); | |||||
- else | |||||
- print_str_opt("color_primaries", av_color_primaries_name(par->color_primaries)); | |||||
+ print_primaries(w, par->color_primaries); | |||||
if (par->chroma_location != AVCHROMA_LOC_UNSPECIFIED) | |||||
print_str("chroma_location", av_chroma_location_name(par->chroma_location)); |