diff --git a/blender-2.63a-cve.patch b/blender-2.63a-cve.patch index e69de29..90fbc0b 100644 --- a/blender-2.63a-cve.patch +++ b/blender-2.63a-cve.patch @@ -0,0 +1,42 @@ +diff -up blender-2.63a/source/blender/blenkernel/intern/blender.c.cve blender-2.63a/source/blender/blenkernel/intern/blender.c +--- blender-2.63a/source/blender/blenkernel/intern/blender.c.cve 2012-05-10 16:50:20.000000000 +0200 ++++ blender-2.63a/source/blender/blenkernel/intern/blender.c 2012-09-07 10:10:05.518999947 +0200 +@@ -40,6 +40,7 @@ + # define write _write + #endif + ++#include + #include + #include + #include +@@ -706,7 +707,8 @@ void BKE_undo_save_quit(void) + { + UndoElem *uel; + MemFileChunk *chunk; +- int file; ++ int file = -1; ++ int flags = O_BINARY+O_WRONLY+O_CREAT+O_TRUNC; + char str[FILE_MAX]; + + if ( (U.uiflag & USER_GLOBALUNDO)==0) return; +@@ -722,10 +724,16 @@ void BKE_undo_save_quit(void) + + BLI_make_file_string("/", str, BLI_temporary_dir(), "quit.blend"); + +- file = BLI_open(str,O_BINARY+O_WRONLY+O_CREAT+O_TRUNC, 0666); +- if (file == -1) { +- //XXX error("Unable to save %s, check you have permissions", str); +- return; ++ while (file == -1) { ++ file = BLI_open(str,flags, 0666); ++ if (file == -1) { ++ if (errno == EEXIST) { ++ flags ^= O_CREAT; ++ } else { ++ //XXX error("Unable to save %s, check you have permissions", str); ++ return; ++ } ++ } + } + + chunk= uel->memfile.chunks.first; diff --git a/blender.spec b/blender.spec index bbae350..16be9b0 100644 --- a/blender.spec +++ b/blender.spec @@ -13,7 +13,7 @@ Name: blender Epoch: 1 Version: %{blender_api}a -Release: 8%{?dist} +Release: 9%{?dist} Summary: 3D modeling, animation, rendering and post-production @@ -300,6 +300,9 @@ fi || : %{_sysconfdir}/rpm/macros.blender %changelog +* Fri Sep 7 2012 Jochen Schmitt - 1:2.63a-9 +- Fix corrupted patch + * Thu Sep 6 2012 Jochen Schmitt - 1:2.63a-8 - Porting blender-2.49b-cve.patch (#855092, CVE-2008-1103)