Skip to content

Commit dea5443

Browse files
ismaildscho
authored andcommitted
Enable DEP and ASLR
Enable DEP (Data Execution Prevention) and ASLR (Address Space Layout Randomization) support. This applies to both 32bit and 64bit builds and makes it substantially harder to exploit security holes in Git by offering a much more unpredictable attack surface. Signed-off-by: İsmail Dönmez <[email protected]> Signed-off-by: Johannes Schindelin <[email protected]>
1 parent bf2d5d8 commit dea5443

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

config.mak.uname

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -542,6 +542,10 @@ else
542542
ifeq ($(shell expr "$(uname_R)" : '2\.'),2)
543543
# MSys2
544544
prefix = /usr/
545+
# Enable DEP
546+
BASIC_LDFLAGS += -Wl,--nxcompat
547+
# Enable ASLR
548+
BASIC_LDFLAGS += -Wl,--dynamicbase
545549
ifeq (MINGW32,$(MSYSTEM))
546550
prefix = /mingw32
547551
BASIC_LDFLAGS += -Wl,--pic-executable,-e,_mainCRTStartup

0 commit comments

Comments
 (0)