[gdk-pixbuf] MSVC projects: Improve binary security



commit ca35474c4901a0f6469427ddc1d30f59eda9e7ab
Author: Chun-wei Fan <fanchunwei src gnome org>
Date:   Fri Oct 20 16:51:47 2017 +0800

    MSVC projects: Improve binary security
    
    Ensure that the /DYNAMICBASE linker option is enabled (which is the
    default setting), as we inadvertly disabled it in our projects
    explicitly, to improve security of our MSVC-built binaries.
    
    For MSVC 2012 and later, use /HIGHENTROPYVA for linking x64 builds to
    enhance security of the binaries as well.
    
    Pointed out by Ignacio Casal Quinteiro.

 win32/vs10/gdk-pixbuf-build-defines.props   |    4 ++++
 win32/vs10/gdk-pixbuf-csource.vcxproj       |    4 ----
 win32/vs10/gdk-pixbuf-pixdata.vcxproj       |    2 --
 win32/vs10/gdk-pixbuf-query-loaders.vcxproj |    2 --
 win32/vs10/gdk-pixbuf.vcxprojin             |    4 ----
 win32/vs9/gdk-pixbuf-csource.vcproj         |    4 ----
 win32/vs9/gdk-pixbuf-pixdata.vcproj         |    2 --
 win32/vs9/gdk-pixbuf-query-loaders.vcproj   |    2 --
 win32/vs9/gdk-pixbuf.vcprojin               |    4 ----
 9 files changed, 4 insertions(+), 24 deletions(-)
---
diff --git a/win32/vs10/gdk-pixbuf-build-defines.props b/win32/vs10/gdk-pixbuf-build-defines.props
index d36a600..02d1928 100644
--- a/win32/vs10/gdk-pixbuf-build-defines.props
+++ b/win32/vs10/gdk-pixbuf-build-defines.props
@@ -37,6 +37,10 @@ nmake -f gdk-pixbuf-introspection-msvc.mak CFG=$(Configuration) PREFIX=$(GlibEtc
       
<AdditionalDependencies>gio-2.0.lib;gmodule-2.0.lib;gobject-2.0.lib;glib-2.0.lib;intl.lib;libpng16.lib;zlib1.lib;%(AdditionalDependencies)</AdditionalDependencies>
       
<AdditionalLibraryDirectories>$(GlibEtcInstallRoot)\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
       
<IgnoreSpecificDefaultLibraries>LIBCMTD.lib;LIBCMT.lib;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
+      <AdditionalOptions Condition="'$(VisualStudioVersion)|$(Platform)'=='11.0|x64'">/HIGHENTROPYVA 
%(AdditionalOptions)</AdditionalOptions>
+      <AdditionalOptions Condition="'$(VisualStudioVersion)|$(Platform)'=='12.0|x64'">/HIGHENTROPYVA 
%(AdditionalOptions)</AdditionalOptions>
+      <AdditionalOptions Condition="'$(VisualStudioVersion)|$(Platform)'=='14.0|x64'">/HIGHENTROPYVA 
%(AdditionalOptions)</AdditionalOptions>
+      <AdditionalOptions Condition="'$(VisualStudioVersion)|$(Platform)'=='15.0|x64'">/HIGHENTROPYVA 
%(AdditionalOptions)</AdditionalOptions>
     </Link>
   </ItemDefinitionGroup>
   <ItemGroup>
diff --git a/win32/vs10/gdk-pixbuf-csource.vcxproj b/win32/vs10/gdk-pixbuf-csource.vcxproj
index 374164f..bc62a0b 100644
--- a/win32/vs10/gdk-pixbuf-csource.vcxproj
+++ b/win32/vs10/gdk-pixbuf-csource.vcxproj
@@ -88,7 +88,6 @@
       <AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>
       <GenerateDebugInformation>true</GenerateDebugInformation>
       <SubSystem>Console</SubSystem>
-      <RandomizedBaseAddress>false</RandomizedBaseAddress>
       <DataExecutionPrevention>
       </DataExecutionPrevention>
       <TargetMachine>MachineX86</TargetMachine>
@@ -111,7 +110,6 @@
       <SubSystem>Console</SubSystem>
       <OptimizeReferences>true</OptimizeReferences>
       <EnableCOMDATFolding>true</EnableCOMDATFolding>
-      <RandomizedBaseAddress>false</RandomizedBaseAddress>
       <DataExecutionPrevention>
       </DataExecutionPrevention>
       <TargetMachine>MachineX86</TargetMachine>
@@ -135,7 +133,6 @@
       <AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>
       <GenerateDebugInformation>true</GenerateDebugInformation>
       <SubSystem>Console</SubSystem>
-      <RandomizedBaseAddress>false</RandomizedBaseAddress>
       <DataExecutionPrevention>
       </DataExecutionPrevention>
       <TargetMachine>MachineX64</TargetMachine>
@@ -158,7 +155,6 @@
       <SubSystem>Console</SubSystem>
       <OptimizeReferences>true</OptimizeReferences>
       <EnableCOMDATFolding>true</EnableCOMDATFolding>
-      <RandomizedBaseAddress>false</RandomizedBaseAddress>
       <DataExecutionPrevention>
       </DataExecutionPrevention>
       <TargetMachine>MachineX64</TargetMachine>
diff --git a/win32/vs10/gdk-pixbuf-pixdata.vcxproj b/win32/vs10/gdk-pixbuf-pixdata.vcxproj
index 79675d3..032f019 100644
--- a/win32/vs10/gdk-pixbuf-pixdata.vcxproj
+++ b/win32/vs10/gdk-pixbuf-pixdata.vcxproj
@@ -128,7 +128,6 @@
       <AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>
       <GenerateDebugInformation>true</GenerateDebugInformation>
       <SubSystem>Console</SubSystem>
-      <RandomizedBaseAddress>false</RandomizedBaseAddress>
       <DataExecutionPrevention>
       </DataExecutionPrevention>
       <TargetMachine>MachineX64</TargetMachine>
@@ -151,7 +150,6 @@
       <SubSystem>Console</SubSystem>
       <OptimizeReferences>true</OptimizeReferences>
       <EnableCOMDATFolding>true</EnableCOMDATFolding>
-      <RandomizedBaseAddress>false</RandomizedBaseAddress>
       <DataExecutionPrevention>
       </DataExecutionPrevention>
       <TargetMachine>MachineX64</TargetMachine>
diff --git a/win32/vs10/gdk-pixbuf-query-loaders.vcxproj b/win32/vs10/gdk-pixbuf-query-loaders.vcxproj
index 5ebc5e2..cd3963a 100644
--- a/win32/vs10/gdk-pixbuf-query-loaders.vcxproj
+++ b/win32/vs10/gdk-pixbuf-query-loaders.vcxproj
@@ -132,7 +132,6 @@
       <AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>
       <GenerateDebugInformation>true</GenerateDebugInformation>
       <SubSystem>Console</SubSystem>
-      <RandomizedBaseAddress>false</RandomizedBaseAddress>
       <DataExecutionPrevention>
       </DataExecutionPrevention>
       <TargetMachine>MachineX64</TargetMachine>
@@ -155,7 +154,6 @@
       <SubSystem>Console</SubSystem>
       <OptimizeReferences>true</OptimizeReferences>
       <EnableCOMDATFolding>true</EnableCOMDATFolding>
-      <RandomizedBaseAddress>false</RandomizedBaseAddress>
       <DataExecutionPrevention>
       </DataExecutionPrevention>
       <TargetMachine>MachineX64</TargetMachine>
diff --git a/win32/vs10/gdk-pixbuf.vcxprojin b/win32/vs10/gdk-pixbuf.vcxprojin
index 81934b9..42f1253 100644
--- a/win32/vs10/gdk-pixbuf.vcxprojin
+++ b/win32/vs10/gdk-pixbuf.vcxprojin
@@ -145,7 +145,6 @@
       <GenerateDebugInformation>true</GenerateDebugInformation>
       
<ProgramDatabaseFile>$(OutDir)$(GdkPixbufDllPrefix)gdk_pixbuf$(GdkPixbufDllSuffix).pdb</ProgramDatabaseFile>
       <SubSystem>Windows</SubSystem>
-      <RandomizedBaseAddress>false</RandomizedBaseAddress>
       <DataExecutionPrevention>
       </DataExecutionPrevention>
       <TargetMachine>MachineX86</TargetMachine>
@@ -172,7 +171,6 @@
       <SubSystem>Windows</SubSystem>
       <OptimizeReferences>true</OptimizeReferences>
       <EnableCOMDATFolding>true</EnableCOMDATFolding>
-      <RandomizedBaseAddress>false</RandomizedBaseAddress>
       <DataExecutionPrevention>
       </DataExecutionPrevention>
       <TargetMachine>MachineX86</TargetMachine>
@@ -243,7 +241,6 @@
       <GenerateDebugInformation>true</GenerateDebugInformation>
       
<ProgramDatabaseFile>$(OutDir)$(GdkPixbufDllPrefix)gdk_pixbuf$(GdkPixbufDllSuffix).pdb</ProgramDatabaseFile>
       <SubSystem>Windows</SubSystem>
-      <RandomizedBaseAddress>false</RandomizedBaseAddress>
       <DataExecutionPrevention>
       </DataExecutionPrevention>
       <TargetMachine>MachineX86</TargetMachine>
@@ -270,7 +267,6 @@
       <SubSystem>Windows</SubSystem>
       <OptimizeReferences>true</OptimizeReferences>
       <EnableCOMDATFolding>true</EnableCOMDATFolding>
-      <RandomizedBaseAddress>false</RandomizedBaseAddress>
       <DataExecutionPrevention>
       </DataExecutionPrevention>
       <TargetMachine>MachineX86</TargetMachine>
diff --git a/win32/vs9/gdk-pixbuf-csource.vcproj b/win32/vs9/gdk-pixbuf-csource.vcproj
index be78fa9..c6970f7 100644
--- a/win32/vs9/gdk-pixbuf-csource.vcproj
+++ b/win32/vs9/gdk-pixbuf-csource.vcproj
@@ -46,7 +46,6 @@
                                LinkIncremental="2"
                                GenerateDebugInformation="true"
                                SubSystem="1"
-                               RandomizedBaseAddress="1"
                                DataExecutionPrevention="0"
                                TargetMachine="1"
                        />
@@ -78,7 +77,6 @@
                                SubSystem="1"
                                OptimizeReferences="2"
                                EnableCOMDATFolding="2"
-                               RandomizedBaseAddress="1"
                                DataExecutionPrevention="0"
                                TargetMachine="1"
                        />
@@ -111,7 +109,6 @@
                                LinkIncremental="2"
                                GenerateDebugInformation="true"
                                SubSystem="1"
-                               RandomizedBaseAddress="1"
                                DataExecutionPrevention="0"
                                TargetMachine="17"
                        />
@@ -144,7 +141,6 @@
                                SubSystem="1"
                                OptimizeReferences="2"
                                EnableCOMDATFolding="2"
-                               RandomizedBaseAddress="1"
                                DataExecutionPrevention="0"
                                TargetMachine="17"
                        />
diff --git a/win32/vs9/gdk-pixbuf-pixdata.vcproj b/win32/vs9/gdk-pixbuf-pixdata.vcproj
index de88421..04fc757 100644
--- a/win32/vs9/gdk-pixbuf-pixdata.vcproj
+++ b/win32/vs9/gdk-pixbuf-pixdata.vcproj
@@ -75,7 +75,6 @@
                                LinkIncremental="2"
                                GenerateDebugInformation="true"
                                SubSystem="1"
-                               RandomizedBaseAddress="1"
                                DataExecutionPrevention="0"
                                TargetMachine="17"
                        />
@@ -139,7 +138,6 @@
                                SubSystem="1"
                                OptimizeReferences="2"
                                EnableCOMDATFolding="2"
-                               RandomizedBaseAddress="1"
                                DataExecutionPrevention="0"
                                TargetMachine="17"
                        />
diff --git a/win32/vs9/gdk-pixbuf-query-loaders.vcproj b/win32/vs9/gdk-pixbuf-query-loaders.vcproj
index a6eda73..1e18f81 100644
--- a/win32/vs9/gdk-pixbuf-query-loaders.vcproj
+++ b/win32/vs9/gdk-pixbuf-query-loaders.vcproj
@@ -77,7 +77,6 @@
                                LinkIncremental="2"
                                GenerateDebugInformation="true"
                                SubSystem="1"
-                               RandomizedBaseAddress="1"
                                DataExecutionPrevention="0"
                                TargetMachine="17"
                        />
@@ -143,7 +142,6 @@
                                SubSystem="1"
                                OptimizeReferences="2"
                                EnableCOMDATFolding="2"
-                               RandomizedBaseAddress="1"
                                DataExecutionPrevention="0"
                                TargetMachine="17"
                        />
diff --git a/win32/vs9/gdk-pixbuf.vcprojin b/win32/vs9/gdk-pixbuf.vcprojin
index acb8a2e..4948d6d 100644
--- a/win32/vs9/gdk-pixbuf.vcprojin
+++ b/win32/vs9/gdk-pixbuf.vcprojin
@@ -49,7 +49,6 @@
                                LinkIncremental="2"
                                GenerateDebugInformation="true"
                                SubSystem="2"
-                               RandomizedBaseAddress="1"
                                DataExecutionPrevention="0"
                                ImportLibrary="$(OutDir)\gdk_pixbuf-$(ApiVersion).lib"
                                TargetMachine="1"
@@ -85,7 +84,6 @@
                                SubSystem="2"
                                OptimizeReferences="2"
                                EnableCOMDATFolding="2"
-                               RandomizedBaseAddress="1"
                                DataExecutionPrevention="0"
                                ImportLibrary="$(OutDir)\gdk_pixbuf-$(ApiVersion).lib"
                                TargetMachine="1"
@@ -186,7 +184,6 @@
                                LinkIncremental="2"
                                GenerateDebugInformation="true"
                                SubSystem="2"
-                               RandomizedBaseAddress="1"
                                DataExecutionPrevention="0"
                                ImportLibrary="$(OutDir)\gdk_pixbuf-$(ApiVersion).lib"
                                TargetMachine="1"
@@ -222,7 +219,6 @@
                                SubSystem="2"
                                OptimizeReferences="2"
                                EnableCOMDATFolding="2"
-                               RandomizedBaseAddress="1"
                                DataExecutionPrevention="0"
                                ImportLibrary="$(OutDir)\gdk_pixbuf-$(ApiVersion).lib"
                                TargetMachine="1"


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]