diff options
Diffstat (limited to 'media-tv/kodi/files')
-rw-r--r-- | media-tv/kodi/files/kodi-17.3-ftpparse_string.patch | 82 | ||||
-rw-r--r-- | media-tv/kodi/files/kodi-17.3-unrar-vulnerability.patch | 45 |
2 files changed, 0 insertions, 127 deletions
diff --git a/media-tv/kodi/files/kodi-17.3-ftpparse_string.patch b/media-tv/kodi/files/kodi-17.3-ftpparse_string.patch deleted file mode 100644 index da8d57a3d6b2..000000000000 --- a/media-tv/kodi/files/kodi-17.3-ftpparse_string.patch +++ /dev/null @@ -1,82 +0,0 @@ -From 634153c85115b44015cdb1ddd6263f5a87e4e41b Mon Sep 17 00:00:00 2001 -From: Stefan Saraev <stefan@saraev.ca> -Date: Sun, 7 May 2017 17:30:47 +0300 -Subject: [PATCH] FTPParse.cpp: use std::string - ---- - xbmc/filesystem/FTPParse.cpp | 44 ++++++++++++++++++++++---------------------- - 1 file changed, 22 insertions(+), 22 deletions(-) - -diff --git a/xbmc/filesystem/FTPParse.cpp b/xbmc/filesystem/FTPParse.cpp -index 8dd9633ae19e..d78349adb580 100644 ---- a/xbmc/filesystem/FTPParse.cpp -+++ b/xbmc/filesystem/FTPParse.cpp -@@ -30,7 +30,7 @@ CFTPParse::CFTPParse() - m_time = 0; - } - --string CFTPParse::getName() -+std::string CFTPParse::getName() - { - return m_name; - } -@@ -55,16 +55,16 @@ time_t CFTPParse::getTime() - return m_time; - } - --void CFTPParse::setTime(string str) -+void CFTPParse::setTime(std::string str) - { - /* Variables used to capture patterns via the regexes */ -- string month; -- string day; -- string year; -- string hour; -- string minute; -- string second; -- string am_or_pm; -+ std::string month; -+ std::string day; -+ std::string year; -+ std::string hour; -+ std::string minute; -+ std::string second; -+ std::string am_or_pm; - - /* time struct used to set the time_t variable */ - struct tm time_struct = {}; -@@ -334,21 +334,21 @@ int CFTPParse::getDayOfWeek(int month, int date, int year) - return day_of_week; - } - --int CFTPParse::FTPParse(string str) -+int CFTPParse::FTPParse(std::string str) - { - /* Various variable to capture patterns via the regexes */ -- string permissions; -- string link_count; -- string owner; -- string group; -- string size; -- string date; -- string name; -- string type; -- string stuff; -- string facts; -- string version; -- string file_id; -+ std::string permissions; -+ std::string link_count; -+ std::string owner; -+ std::string group; -+ std::string size; -+ std::string date; -+ std::string name; -+ std::string type; -+ std::string stuff; -+ std::string facts; -+ std::string version; -+ std::string file_id; - - /* Regex for standard Unix listing formats */ - pcrecpp::RE unix_re("^([-bcdlps])" // type diff --git a/media-tv/kodi/files/kodi-17.3-unrar-vulnerability.patch b/media-tv/kodi/files/kodi-17.3-unrar-vulnerability.patch deleted file mode 100644 index 95644d6921e7..000000000000 --- a/media-tv/kodi/files/kodi-17.3-unrar-vulnerability.patch +++ /dev/null @@ -1,45 +0,0 @@ -See https://trac.kodi.tv/ticket/17510 -diff --git a/lib/UnrarXLib/rarvm.cpp b/lib/UnrarXLib/rarvm.cpp -index 901c35dcb4..42df0a0110 100644 ---- a/lib/UnrarXLib/rarvm.cpp -+++ b/lib/UnrarXLib/rarvm.cpp -@@ -873,14 +873,16 @@ void RarVM::ExecuteStandardFilter(VM_StandardFilters FilterType) - break; - case VMSF_DELTA: - { -- int DataSize=R[4],Channels=R[0],SrcPos=0,Border=DataSize*2; -- SET_VALUE(false,&Mem[VM_GLOBALMEMADDR+0x20],DataSize); -- if (DataSize>=VM_GLOBALMEMADDR/2) -- break; -- for (int CurChannel=0;CurChannel<Channels;CurChannel++) -+ uint DataSize=R[4],Channels=R[0],SrcPos=0,Border=DataSize*2; -+ if (DataSize>VM_MEMSIZE/2 || Channels>MAX3_UNPACK_CHANNELS || Channels==0) -+ break; -+ -+ // Bytes from same channels are grouped to continual data blocks, -+ // so we need to place them back to their interleaving positions. -+ for (uint CurChannel=0;CurChannel<Channels;CurChannel++) - { - byte PrevByte=0; -- for (int DestPos=DataSize+CurChannel;DestPos<Border;DestPos+=Channels) -+ for (uint DestPos=DataSize+CurChannel;DestPos<Border;DestPos+=Channels) - Mem[DestPos]=(PrevByte-=Mem[SrcPos++]); - } - } -diff --git a/lib/UnrarXLib/unpack.hpp b/lib/UnrarXLib/unpack.hpp -index 83fb0f0254..36ac30d181 100644 ---- a/lib/UnrarXLib/unpack.hpp -+++ b/lib/UnrarXLib/unpack.hpp -@@ -1,6 +1,12 @@ - #ifndef _RAR_UNPACK_ - #define _RAR_UNPACK_ - -+// Limit maximum number of channels in RAR3 delta filter to some reasonable -+// value to prevent too slow processing of corrupt archives with invalid -+// channels number. Must be equal or larger than v3_MAX_FILTER_CHANNELS. -+// No need to provide it for RAR5, which uses only 5 bits to store channels. -+#define MAX3_UNPACK_CHANNELS 1024 -+ - enum BLOCK_TYPES {BLOCK_LZ,BLOCK_PPM}; - - struct Decode |