Skip to content

Commit 1e798d8

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 87cb2fb commit 1e798d8

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
@@ -545,6 +545,10 @@ else
545545
ifeq ($(shell expr "$(uname_R)" : '2\.'),2)
546546
# MSys2
547547
prefix = /usr/
548+
# Enable DEP
549+
BASIC_LDFLAGS += -Wl,--nxcompat
550+
# Enable ASLR
551+
BASIC_LDFLAGS += -Wl,--dynamicbase
548552
ifeq (MINGW32,$(MSYSTEM))
549553
prefix = /mingw32
550554
BASIC_LDFLAGS += -Wl,--pic-executable,-e,_mainCRTStartup

0 commit comments

Comments
 (0)