|
![](https://seccdn.libravatar.org/avatar/13ac4cc5beae5aa74858681ab9563ec737b1c41d32cce577997359925e47417f?s=16&d=retro) |
1df9ad0 |
diff -up blender-2.49b/source/blender/blenkernel/intern/blender.c.cve blender-2.49b/source/blender/blenkernel/intern/blender.c
|
|
![](https://seccdn.libravatar.org/avatar/13ac4cc5beae5aa74858681ab9563ec737b1c41d32cce577997359925e47417f?s=16&d=retro) |
1df9ad0 |
--- blender-2.49b/source/blender/blenkernel/intern/blender.c.cve 2009-09-01 17:21:17.000000000 +0200
|
|
![](https://seccdn.libravatar.org/avatar/13ac4cc5beae5aa74858681ab9563ec737b1c41d32cce577997359925e47417f?s=16&d=retro) |
1df9ad0 |
+++ blender-2.49b/source/blender/blenkernel/intern/blender.c 2010-01-13 17:32:11.312632711 +0100
|
|
![](https://seccdn.libravatar.org/avatar/13ac4cc5beae5aa74858681ab9563ec737b1c41d32cce577997359925e47417f?s=16&d=retro) |
1df9ad0 |
@@ -41,6 +41,7 @@
|
|
![](https://seccdn.libravatar.org/avatar/13ac4cc5beae5aa74858681ab9563ec737b1c41d32cce577997359925e47417f?s=16&d=retro) |
1df9ad0 |
#define write _write
|
|
![](https://seccdn.libravatar.org/avatar/13ac4cc5beae5aa74858681ab9563ec737b1c41d32cce577997359925e47417f?s=16&d=retro) |
1df9ad0 |
#endif
|
|
![](https://seccdn.libravatar.org/avatar/13ac4cc5beae5aa74858681ab9563ec737b1c41d32cce577997359925e47417f?s=16&d=retro) |
1df9ad0 |
|
|
![](https://seccdn.libravatar.org/avatar/13ac4cc5beae5aa74858681ab9563ec737b1c41d32cce577997359925e47417f?s=16&d=retro) |
1df9ad0 |
+#include <errno.h>
|
|
![](https://seccdn.libravatar.org/avatar/13ac4cc5beae5aa74858681ab9563ec737b1c41d32cce577997359925e47417f?s=16&d=retro) |
1df9ad0 |
#include <stdlib.h>
|
|
![](https://seccdn.libravatar.org/avatar/13ac4cc5beae5aa74858681ab9563ec737b1c41d32cce577997359925e47417f?s=16&d=retro) |
1df9ad0 |
#include <stdio.h>
|
|
![](https://seccdn.libravatar.org/avatar/13ac4cc5beae5aa74858681ab9563ec737b1c41d32cce577997359925e47417f?s=16&d=retro) |
1df9ad0 |
#include <string.h>
|
|
![](https://seccdn.libravatar.org/avatar/13ac4cc5beae5aa74858681ab9563ec737b1c41d32cce577997359925e47417f?s=16&d=retro) |
1df9ad0 |
@@ -753,7 +754,7 @@ void BKE_undo_save_quit(void)
|
|
![](https://seccdn.libravatar.org/avatar/13ac4cc5beae5aa74858681ab9563ec737b1c41d32cce577997359925e47417f?s=16&d=retro) |
1df9ad0 |
{
|
|
![](https://seccdn.libravatar.org/avatar/13ac4cc5beae5aa74858681ab9563ec737b1c41d32cce577997359925e47417f?s=16&d=retro) |
1df9ad0 |
UndoElem *uel;
|
|
![](https://seccdn.libravatar.org/avatar/13ac4cc5beae5aa74858681ab9563ec737b1c41d32cce577997359925e47417f?s=16&d=retro) |
1df9ad0 |
MemFileChunk *chunk;
|
|
![](https://seccdn.libravatar.org/avatar/13ac4cc5beae5aa74858681ab9563ec737b1c41d32cce577997359925e47417f?s=16&d=retro) |
1df9ad0 |
- int file;
|
|
![](https://seccdn.libravatar.org/avatar/13ac4cc5beae5aa74858681ab9563ec737b1c41d32cce577997359925e47417f?s=16&d=retro) |
1df9ad0 |
+ int file = -1;
|
|
![](https://seccdn.libravatar.org/avatar/13ac4cc5beae5aa74858681ab9563ec737b1c41d32cce577997359925e47417f?s=16&d=retro) |
1df9ad0 |
char str[FILE_MAXDIR+FILE_MAXFILE];
|
|
![](https://seccdn.libravatar.org/avatar/13ac4cc5beae5aa74858681ab9563ec737b1c41d32cce577997359925e47417f?s=16&d=retro) |
1df9ad0 |
|
|
![](https://seccdn.libravatar.org/avatar/13ac4cc5beae5aa74858681ab9563ec737b1c41d32cce577997359925e47417f?s=16&d=retro) |
1df9ad0 |
if( (U.uiflag & USER_GLOBALUNDO)==0) return;
|
|
![](https://seccdn.libravatar.org/avatar/13ac4cc5beae5aa74858681ab9563ec737b1c41d32cce577997359925e47417f?s=16&d=retro) |
1df9ad0 |
@@ -767,12 +768,20 @@ void BKE_undo_save_quit(void)
|
|
![](https://seccdn.libravatar.org/avatar/13ac4cc5beae5aa74858681ab9563ec737b1c41d32cce577997359925e47417f?s=16&d=retro) |
1df9ad0 |
/* no undo state to save */
|
|
![](https://seccdn.libravatar.org/avatar/13ac4cc5beae5aa74858681ab9563ec737b1c41d32cce577997359925e47417f?s=16&d=retro) |
1df9ad0 |
if(undobase.first==undobase.last) return;
|
|
![](https://seccdn.libravatar.org/avatar/13ac4cc5beae5aa74858681ab9563ec737b1c41d32cce577997359925e47417f?s=16&d=retro) |
1df9ad0 |
|
|
![](https://seccdn.libravatar.org/avatar/13ac4cc5beae5aa74858681ab9563ec737b1c41d32cce577997359925e47417f?s=16&d=retro) |
1df9ad0 |
- BLI_make_file_string("/", str, btempdir, "quit.blend");
|
|
![](https://seccdn.libravatar.org/avatar/13ac4cc5beae5aa74858681ab9563ec737b1c41d32cce577997359925e47417f?s=16&d=retro) |
1df9ad0 |
+ BLI_make_file_string("/", str, BLI_gethome(), ".blender/quit.blend");
|
|
![](https://seccdn.libravatar.org/avatar/13ac4cc5beae5aa74858681ab9563ec737b1c41d32cce577997359925e47417f?s=16&d=retro) |
1df9ad0 |
|
|
![](https://seccdn.libravatar.org/avatar/13ac4cc5beae5aa74858681ab9563ec737b1c41d32cce577997359925e47417f?s=16&d=retro) |
1df9ad0 |
- file = open(str,O_BINARY+O_WRONLY+O_CREAT+O_TRUNC, 0666);
|
|
![](https://seccdn.libravatar.org/avatar/13ac4cc5beae5aa74858681ab9563ec737b1c41d32cce577997359925e47417f?s=16&d=retro) |
1df9ad0 |
- if(file == -1) {
|
|
![](https://seccdn.libravatar.org/avatar/13ac4cc5beae5aa74858681ab9563ec737b1c41d32cce577997359925e47417f?s=16&d=retro) |
1df9ad0 |
- error("Unable to save %s, check you have permissions", str);
|
|
![](https://seccdn.libravatar.org/avatar/13ac4cc5beae5aa74858681ab9563ec737b1c41d32cce577997359925e47417f?s=16&d=retro) |
1df9ad0 |
- return;
|
|
![](https://seccdn.libravatar.org/avatar/13ac4cc5beae5aa74858681ab9563ec737b1c41d32cce577997359925e47417f?s=16&d=retro) |
1df9ad0 |
+ int flags = O_BINARY+O_WRONLY+O_TRUNC+O_EXCL+O_CREAT;
|
|
![](https://seccdn.libravatar.org/avatar/13ac4cc5beae5aa74858681ab9563ec737b1c41d32cce577997359925e47417f?s=16&d=retro) |
1df9ad0 |
+
|
|
![](https://seccdn.libravatar.org/avatar/13ac4cc5beae5aa74858681ab9563ec737b1c41d32cce577997359925e47417f?s=16&d=retro) |
1df9ad0 |
+ while(file == -1) {
|
|
![](https://seccdn.libravatar.org/avatar/13ac4cc5beae5aa74858681ab9563ec737b1c41d32cce577997359925e47417f?s=16&d=retro) |
1df9ad0 |
+ file = open(str,flags,0666);
|
|
![](https://seccdn.libravatar.org/avatar/13ac4cc5beae5aa74858681ab9563ec737b1c41d32cce577997359925e47417f?s=16&d=retro) |
1df9ad0 |
+ if(file == -1) {
|
|
![](https://seccdn.libravatar.org/avatar/13ac4cc5beae5aa74858681ab9563ec737b1c41d32cce577997359925e47417f?s=16&d=retro) |
1df9ad0 |
+ if(errno == EEXIST) {
|
|
![](https://seccdn.libravatar.org/avatar/13ac4cc5beae5aa74858681ab9563ec737b1c41d32cce577997359925e47417f?s=16&d=retro) |
1df9ad0 |
+ flags ^= O_CREAT;
|
|
![](https://seccdn.libravatar.org/avatar/13ac4cc5beae5aa74858681ab9563ec737b1c41d32cce577997359925e47417f?s=16&d=retro) |
1df9ad0 |
+ } else {
|
|
![](https://seccdn.libravatar.org/avatar/13ac4cc5beae5aa74858681ab9563ec737b1c41d32cce577997359925e47417f?s=16&d=retro) |
1df9ad0 |
+ error("Unable to save %s, check you have permissions", str);
|
|
![](https://seccdn.libravatar.org/avatar/13ac4cc5beae5aa74858681ab9563ec737b1c41d32cce577997359925e47417f?s=16&d=retro) |
1df9ad0 |
+ return;
|
|
![](https://seccdn.libravatar.org/avatar/13ac4cc5beae5aa74858681ab9563ec737b1c41d32cce577997359925e47417f?s=16&d=retro) |
1df9ad0 |
+ }
|
|
![](https://seccdn.libravatar.org/avatar/13ac4cc5beae5aa74858681ab9563ec737b1c41d32cce577997359925e47417f?s=16&d=retro) |
1df9ad0 |
+ }
|
|
![](https://seccdn.libravatar.org/avatar/13ac4cc5beae5aa74858681ab9563ec737b1c41d32cce577997359925e47417f?s=16&d=retro) |
1df9ad0 |
}
|
|
![](https://seccdn.libravatar.org/avatar/13ac4cc5beae5aa74858681ab9563ec737b1c41d32cce577997359925e47417f?s=16&d=retro) |
1df9ad0 |
|
|
![](https://seccdn.libravatar.org/avatar/13ac4cc5beae5aa74858681ab9563ec737b1c41d32cce577997359925e47417f?s=16&d=retro) |
1df9ad0 |
chunk= uel->memfile.chunks.first;
|
|
![](https://seccdn.libravatar.org/avatar/13ac4cc5beae5aa74858681ab9563ec737b1c41d32cce577997359925e47417f?s=16&d=retro) |
1df9ad0 |
diff -up blender-2.49b/source/blender/python/BPY_interface.c.cve blender-2.49b/source/blender/python/BPY_interface.c
|
|
![](https://seccdn.libravatar.org/avatar/13ac4cc5beae5aa74858681ab9563ec737b1c41d32cce577997359925e47417f?s=16&d=retro) |
1df9ad0 |
--- blender-2.49b/source/blender/python/BPY_interface.c.cve 2009-09-01 17:21:12.000000000 +0200
|
|
![](https://seccdn.libravatar.org/avatar/13ac4cc5beae5aa74858681ab9563ec737b1c41d32cce577997359925e47417f?s=16&d=retro) |
1df9ad0 |
+++ blender-2.49b/source/blender/python/BPY_interface.c 2010-01-13 17:08:19.567752630 +0100
|
|
![](https://seccdn.libravatar.org/avatar/13ac4cc5beae5aa74858681ab9563ec737b1c41d32cce577997359925e47417f?s=16&d=retro) |
1df9ad0 |
@@ -236,6 +236,11 @@ void BPY_start_python( int argc, char **
|
|
![](https://seccdn.libravatar.org/avatar/13ac4cc5beae5aa74858681ab9563ec737b1c41d32cce577997359925e47417f?s=16&d=retro) |
1df9ad0 |
Py_Initialize( );
|
|
![](https://seccdn.libravatar.org/avatar/13ac4cc5beae5aa74858681ab9563ec737b1c41d32cce577997359925e47417f?s=16&d=retro) |
1df9ad0 |
|
|
![](https://seccdn.libravatar.org/avatar/13ac4cc5beae5aa74858681ab9563ec737b1c41d32cce577997359925e47417f?s=16&d=retro) |
1df9ad0 |
PySys_SetArgv( argc_copy, argv_copy );
|
|
![](https://seccdn.libravatar.org/avatar/13ac4cc5beae5aa74858681ab9563ec737b1c41d32cce577997359925e47417f?s=16&d=retro) |
1df9ad0 |
+
|
|
![](https://seccdn.libravatar.org/avatar/13ac4cc5beae5aa74858681ab9563ec737b1c41d32cce577997359925e47417f?s=16&d=retro) |
1df9ad0 |
+ /* Sanitize sys.path to prevent relative imports loading modules in
|
|
![](https://seccdn.libravatar.org/avatar/13ac4cc5beae5aa74858681ab9563ec737b1c41d32cce577997359925e47417f?s=16&d=retro) |
1df9ad0 |
+ the current working directory */
|
|
![](https://seccdn.libravatar.org/avatar/13ac4cc5beae5aa74858681ab9563ec737b1c41d32cce577997359925e47417f?s=16&d=retro) |
1df9ad0 |
+ PyRun_SimpleString("import sys; sys.path = filter(None, sys.path)");
|
|
![](https://seccdn.libravatar.org/avatar/13ac4cc5beae5aa74858681ab9563ec737b1c41d32cce577997359925e47417f?s=16&d=retro) |
1df9ad0 |
+
|
|
![](https://seccdn.libravatar.org/avatar/13ac4cc5beae5aa74858681ab9563ec737b1c41d32cce577997359925e47417f?s=16&d=retro) |
1df9ad0 |
/* Initialize thread support (also acquires lock) */
|
|
![](https://seccdn.libravatar.org/avatar/13ac4cc5beae5aa74858681ab9563ec737b1c41d32cce577997359925e47417f?s=16&d=retro) |
1df9ad0 |
PyEval_InitThreads();
|
|
![](https://seccdn.libravatar.org/avatar/13ac4cc5beae5aa74858681ab9563ec737b1c41d32cce577997359925e47417f?s=16&d=retro) |
1df9ad0 |
|