rpms/blender/devel blender-2.49b-cve.patch, NONE, 1.1 blender.spec, 1.128, 1.129 blender-2.46rc3-cve-2008-1103-1.patch, 1.1, NONE blender-2.48a-cve-2008-4863.patch, 1.1, NONE
Jochen Schmitt
s4504kr at fedoraproject.org
Wed Jan 13 19:18:14 UTC 2010
Author: s4504kr
Update of /cvs/pkgs/rpms/blender/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv29157
Modified Files:
blender.spec
Added Files:
blender-2.49b-cve.patch
Removed Files:
blender-2.46rc3-cve-2008-1103-1.patch
blender-2.48a-cve-2008-4863.patch
Log Message:
Add forgotten patch
blender-2.49b-cve.patch:
blenkernel/intern/blender.c | 21 +++++++++++++++------
python/BPY_interface.c | 5 +++++
2 files changed, 20 insertions(+), 6 deletions(-)
--- NEW FILE blender-2.49b-cve.patch ---
diff -up blender-2.49b/source/blender/blenkernel/intern/blender.c.cve blender-2.49b/source/blender/blenkernel/intern/blender.c
--- blender-2.49b/source/blender/blenkernel/intern/blender.c.cve 2009-09-01 17:21:17.000000000 +0200
+++ blender-2.49b/source/blender/blenkernel/intern/blender.c 2010-01-13 17:32:11.312632711 +0100
@@ -41,6 +41,7 @@
#define write _write
#endif
+#include <errno.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
@@ -753,7 +754,7 @@ void BKE_undo_save_quit(void)
{
UndoElem *uel;
MemFileChunk *chunk;
- int file;
+ int file = -1;
char str[FILE_MAXDIR+FILE_MAXFILE];
if( (U.uiflag & USER_GLOBALUNDO)==0) return;
@@ -767,12 +768,20 @@ void BKE_undo_save_quit(void)
/* no undo state to save */
if(undobase.first==undobase.last) return;
- BLI_make_file_string("/", str, btempdir, "quit.blend");
+ BLI_make_file_string("/", str, BLI_gethome(), ".blender/quit.blend");
- file = open(str,O_BINARY+O_WRONLY+O_CREAT+O_TRUNC, 0666);
- if(file == -1) {
- error("Unable to save %s, check you have permissions", str);
- return;
+ int flags = O_BINARY+O_WRONLY+O_TRUNC+O_EXCL+O_CREAT;
+
+ while(file == -1) {
+ file = open(str,flags,0666);
+ if(file == -1) {
+ if(errno == EEXIST) {
+ flags ^= O_CREAT;
+ } else {
+ error("Unable to save %s, check you have permissions", str);
+ return;
+ }
+ }
}
chunk= uel->memfile.chunks.first;
diff -up blender-2.49b/source/blender/python/BPY_interface.c.cve blender-2.49b/source/blender/python/BPY_interface.c
--- blender-2.49b/source/blender/python/BPY_interface.c.cve 2009-09-01 17:21:12.000000000 +0200
+++ blender-2.49b/source/blender/python/BPY_interface.c 2010-01-13 17:08:19.567752630 +0100
@@ -236,6 +236,11 @@ void BPY_start_python( int argc, char **
Py_Initialize( );
PySys_SetArgv( argc_copy, argv_copy );
+
+ /* Sanitize sys.path to prevent relative imports loading modules in
+ the current working directory */
+ PyRun_SimpleString("import sys; sys.path = filter(None, sys.path)");
+
/* Initialize thread support (also acquires lock) */
PyEval_InitThreads();
Index: blender.spec
===================================================================
RCS file: /cvs/pkgs/rpms/blender/devel/blender.spec,v
retrieving revision 1.128
retrieving revision 1.129
diff -u -p -r1.128 -r1.129
--- blender.spec 13 Jan 2010 17:08:55 -0000 1.128
+++ blender.spec 13 Jan 2010 19:18:14 -0000 1.129
@@ -5,7 +5,7 @@
Name: blender
Version: 2.49b
-Release: 4%{?dist}
+Release: 5%{?dist}
Summary: 3D modeling, animation, rendering and post-production
@@ -244,6 +244,9 @@ fi || :
%{_bindir}/blenderplayer.bin
%changelog
+* Wed Jan 13 2010 Jochen Schmitt <Jochen herr-schmitt de> - 2.49b-5
+- Add forgotten patch
+
* Wed Jan 13 2010 Jochen Schmitt <Jochen herr-schmitt de> 2.49b-4
- Fix O_CREAT issue on existing quit.blend file (#553959)
- Move quit.blend to ~/.blender
--- blender-2.46rc3-cve-2008-1103-1.patch DELETED ---
--- blender-2.48a-cve-2008-4863.patch DELETED ---
More information about the scm-commits
mailing list