diff --git a/CVE-2022-0561_and_CVE-2022-0562.patch b/CVE-2022-0561_and_CVE-2022-0562.patch deleted file mode 100644 index 948b05779f9365284d28bd91af26838ecdcac36a..0000000000000000000000000000000000000000 --- a/CVE-2022-0561_and_CVE-2022-0562.patch +++ /dev/null @@ -1,25 +0,0 @@ -diff -Npur opencv-4.5.2/3rdparty/libtiff/tif_dirread.c opencv-4.5.2-new/3rdparty/libtiff/tif_dirread.c ---- opencv-4.5.2/3rdparty/libtiff/tif_dirread.c 2021-04-02 19:23:54.000000000 +0800 -+++ opencv-4.5.2-new/3rdparty/libtiff/tif_dirread.c 2022-05-21 14:44:25.639756094 +0800 -@@ -4173,7 +4173,8 @@ TIFFReadDirectory(TIFF* tif) - goto bad; - } - -- memcpy(new_sampleinfo, tif->tif_dir.td_sampleinfo, old_extrasamples * sizeof(uint16)); -+ if (old_extrasamples > 0) -+ memcpy(new_sampleinfo, tif->tif_dir.td_sampleinfo, old_extrasamples * sizeof(uint16)); - _TIFFsetShortArray(&tif->tif_dir.td_sampleinfo, new_sampleinfo, tif->tif_dir.td_extrasamples); - _TIFFfree(new_sampleinfo); - } -@@ -5765,8 +5766,9 @@ TIFFFetchStripThing(TIFF* tif, TIFFDirEn - _TIFFfree(data); - return(0); - } -- _TIFFmemcpy(resizeddata,data,(uint32)dir->tdir_count*sizeof(uint64)); -- _TIFFmemset(resizeddata+(uint32)dir->tdir_count,0,(nstrips-(uint32)dir->tdir_count)*sizeof(uint64)); -+ if( dir->tdir_count ) -+ _TIFFmemcpy(resizeddata,data, (uint32)dir->tdir_count * sizeof(uint64)); -+ _TIFFmemset(resizeddata+(uint32)dir->tdir_count, 0, (nstrips - (uint32)dir->tdir_count) * sizeof(uint64)); - _TIFFfree(data); - data=resizeddata; - } diff --git a/CVE-2022-0908.patch b/CVE-2022-0908.patch deleted file mode 100644 index 53f29746d757d8af0e3df00840b2dcc99acd8197..0000000000000000000000000000000000000000 --- a/CVE-2022-0908.patch +++ /dev/null @@ -1,15 +0,0 @@ -diff -Npur opencv-4.5.2/3rdparty/libtiff/tif_dirread.c opencv-4.5.2-new/3rdparty/libtiff/tif_dirread.c ---- opencv-4.5.2/3rdparty/libtiff/tif_dirread.c 2021-04-02 19:23:54.000000000 +0800 -+++ opencv-4.5.2-new/3rdparty/libtiff/tif_dirread.c 2022-05-21 14:36:31.761285562 +0800 -@@ -5079,7 +5079,10 @@ TIFFFetchNormalTag(TIFF* tif, TIFFDirEnt - _TIFFfree(data); - return(0); - } -- _TIFFmemcpy(o,data,(uint32)dp->tdir_count); -+ if (dp->tdir_count > 0 ) -+ { -+ _TIFFmemcpy(o,data,(uint32)dp->tdir_count); -+ } - o[(uint32)dp->tdir_count]=0; - if (data!=0) - _TIFFfree(data); diff --git a/docs/opencv.png b/docs/opencv.png deleted file mode 100644 index a61b676b08b0bc649ec6ce59d8a9d84688eefb61..0000000000000000000000000000000000000000 Binary files a/docs/opencv.png and /dev/null differ diff --git a/docs/opencv_module.png b/docs/opencv_module.png deleted file mode 100644 index 29df5c5b8fe25197df1f22e68993a08e7a55fc69..0000000000000000000000000000000000000000 Binary files a/docs/opencv_module.png and /dev/null differ diff --git a/opencv.spec b/opencv.spec index c68df721ca68f9645298a5ed3710c0a6480eb32f..b6724a299d71af6dd7f004837c2297540249486d 100644 --- a/opencv.spec +++ b/opencv.spec @@ -37,7 +37,7 @@ cat %{SOURCE2} %{SOURCE3} %{SOURCE4} %{SOURCE5} %{SOURCE6} > %{SOURCE1} %autosetup -p1 -n %{name}-%{version} tar -xvf %{SOURCE1} -C . pwd - +yum remove -y python2 %build mkdir -p cmake/build cd cmake/build