[Bf-blender-cvs] [a892cf6] master: Apparently msvc doesn't have #warning

Sergey Sharybin noreply at git.blender.org
Tue Apr 22 20:26:23 CEST 2014


Commit: a892cf683be27b15a87ae0d9c21b5ed512497a1a
Author: Sergey Sharybin
Date:   Wed Apr 23 00:25:19 2014 +0600
https://developer.blender.org/rBa892cf683be27b15a87ae0d9c21b5ed512497a1a

Apparently msvc doesn't have #warning

It's unclear how to deal with symlinks on windows as well..

===================================================================

M	source/blender/blenkernel/intern/blender.c

===================================================================

diff --git a/source/blender/blenkernel/intern/blender.c b/source/blender/blenkernel/intern/blender.c
index 92702b0..aa860cf 100644
--- a/source/blender/blenkernel/intern/blender.c
+++ b/source/blender/blenkernel/intern/blender.c
@@ -832,7 +832,10 @@ bool BKE_undo_save_file(const char *filename)
 	/* use O_NOFOLLOW to avoid writing to a symlink - use 'O_EXCL' (CVE-2008-1103) */
 	oflags |= O_NOFOLLOW;
 #else
-#  warning "Symbolic links will be followed on undo save, possibly causing CVE-2008-1103"
+	/* TODO(sergey): How to deal with symlinks on windows? */
+#  ifndef _MSC_VER
+#    warning "Symbolic links will be followed on undo save, possibly causing CVE-2008-1103"
+#  endif
 #endif
 	file = BLI_open(filename,  oflags, 0666);




More information about the Bf-blender-cvs mailing list