Gentoo Archives: gentoo-commits

From: "Jason A. Donenfeld" <zx2c4@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: media-libs/libmp4v2/, media-libs/libmp4v2/files/
Date: Thu, 06 Aug 2020 13:25:13
Message-Id: 1596720254.45145f7b3d15af680db938c5a3fd78a68502fad7.zx2c4@gentoo
1 commit: 45145f7b3d15af680db938c5a3fd78a68502fad7
2 Author: Jason A. Donenfeld <zx2c4 <AT> gentoo <DOT> org>
3 AuthorDate: Thu Aug 6 13:24:14 2020 +0000
4 Commit: Jason A. Donenfeld <zx2c4 <AT> gentoo <DOT> org>
5 CommitDate: Thu Aug 6 13:24:14 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=45145f7b
7
8 media-libs/libmp4v2: fix compilation with recent gcc
9
10 Closes: https://bugs.gentoo.org/723098
11 Package-Manager: Portage-3.0.1, Repoman-2.3.23
12 Signed-off-by: Jason A. Donenfeld <zx2c4 <AT> gentoo.org>
13
14 .../files/libmp4v2-2.0.0-unsigned-int-cast.patch | 96 ++++++++++++++++++++++
15 media-libs/libmp4v2/libmp4v2-2.0.0-r2.ebuild | 1 +
16 2 files changed, 97 insertions(+)
17
18 diff --git a/media-libs/libmp4v2/files/libmp4v2-2.0.0-unsigned-int-cast.patch b/media-libs/libmp4v2/files/libmp4v2-2.0.0-unsigned-int-cast.patch
19 new file mode 100644
20 index 00000000000..25830bc596b
21 --- /dev/null
22 +++ b/media-libs/libmp4v2/files/libmp4v2-2.0.0-unsigned-int-cast.patch
23 @@ -0,0 +1,96 @@
24 +From a5ca35b044bbf13c0b16f0066bf24646604bb218 Mon Sep 17 00:00:00 2001
25 +From: "Jason A. Donenfeld" <Jason@×××××.com>
26 +Date: Thu, 6 Aug 2020 15:22:04 +0200
27 +Subject: [PATCH] Static cast to unsigned int for cases
28 +
29 +Signed-off-by: Jason A. Donenfeld <Jason@×××××.com>
30 +---
31 + libutil/Utility.cpp | 2 +-
32 + util/mp4art.cpp | 2 +-
33 + util/mp4chaps.cpp | 2 +-
34 + util/mp4file.cpp | 2 +-
35 + util/mp4subtitle.cpp | 2 +-
36 + util/mp4track.cpp | 2 +-
37 + 6 files changed, 6 insertions(+), 6 deletions(-)
38 +
39 +diff --git a/libutil/Utility.cpp b/libutil/Utility.cpp
40 +index 76cdd12..d6739d4 100644
41 +--- a/libutil/Utility.cpp
42 ++++ b/libutil/Utility.cpp
43 +@@ -493,7 +493,7 @@ Utility::process_impl()
44 + if( codes.find( code ) == codes.end() )
45 + continue;
46 +
47 +- switch( code ) {
48 ++ switch( static_cast<unsigned int>( code ) ) {
49 + case 'z':
50 + _optimize = true;
51 + break;
52 +diff --git a/util/mp4art.cpp b/util/mp4art.cpp
53 +index add935e..6e7f531 100644
54 +--- a/util/mp4art.cpp
55 ++++ b/util/mp4art.cpp
56 +@@ -376,7 +376,7 @@ ArtUtility::utility_option( int code, bool& handled )
57 + {
58 + handled = true;
59 +
60 +- switch( code ) {
61 ++ switch( static_cast<unsigned int> ( code ) ) {
62 + case LC_ART_ANY:
63 + _artFilter = numeric_limits<uint32_t>::max();
64 + break;
65 +diff --git a/util/mp4chaps.cpp b/util/mp4chaps.cpp
66 +index 98400f8..ccc8b70 100644
67 +--- a/util/mp4chaps.cpp
68 ++++ b/util/mp4chaps.cpp
69 +@@ -632,7 +632,7 @@ ChapterUtility::utility_option( int code, bool& handled )
70 + {
71 + handled = true;
72 +
73 +- switch( code ) {
74 ++ switch( static_cast<unsigned int> ( code ) ) {
75 + case 'A':
76 + case LC_CHPT_ANY:
77 + _ChapterType = MP4ChapterTypeAny;
78 +diff --git a/util/mp4file.cpp b/util/mp4file.cpp
79 +index c27844b..b127cd1 100644
80 +--- a/util/mp4file.cpp
81 ++++ b/util/mp4file.cpp
82 +@@ -189,7 +189,7 @@ FileUtility::utility_option( int code, bool& handled )
83 + {
84 + handled = true;
85 +
86 +- switch( code ) {
87 ++ switch( static_cast<unsigned int>( code ) ) {
88 + case LC_LIST:
89 + _action = &FileUtility::actionList;
90 + break;
91 +diff --git a/util/mp4subtitle.cpp b/util/mp4subtitle.cpp
92 +index 7462153..19d977d 100644
93 +--- a/util/mp4subtitle.cpp
94 ++++ b/util/mp4subtitle.cpp
95 +@@ -164,7 +164,7 @@ SubtitleUtility::utility_option( int code, bool& handled )
96 + {
97 + handled = true;
98 +
99 +- switch( code ) {
100 ++ switch( static_cast<unsigned int>( code ) ) {
101 + case LC_LIST:
102 + _action = &SubtitleUtility::actionList;
103 + break;
104 +diff --git a/util/mp4track.cpp b/util/mp4track.cpp
105 +index d550506..cd63d7e 100644
106 +--- a/util/mp4track.cpp
107 ++++ b/util/mp4track.cpp
108 +@@ -788,7 +788,7 @@ TrackUtility::utility_option( int code, bool& handled )
109 + {
110 + handled = true;
111 +
112 +- switch( code ) {
113 ++ switch( static_cast<unsigned int>( code ) ) {
114 + case LC_TRACK_WILDCARD:
115 + _trackMode = TM_WILDCARD;
116 + break;
117 +--
118 +2.28.0
119 +
120
121 diff --git a/media-libs/libmp4v2/libmp4v2-2.0.0-r2.ebuild b/media-libs/libmp4v2/libmp4v2-2.0.0-r2.ebuild
122 index 9602704da8a..44a34cb45c5 100644
123 --- a/media-libs/libmp4v2/libmp4v2-2.0.0-r2.ebuild
124 +++ b/media-libs/libmp4v2/libmp4v2-2.0.0-r2.ebuild
125 @@ -32,6 +32,7 @@ PATCHES=(
126 "${FILESDIR}/${P}-CVE-2018-14325.patch"
127 "${FILESDIR}/${P}-CVE-2018-14379.patch"
128 "${FILESDIR}/${P}-CVE-2018-14403.patch"
129 + "${FILESDIR}/${P}-unsigned-int-cast.patch"
130 )
131
132 src_prepare() {