Skip to content

Commit 6b3f37e

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 8840d8c commit 6b3f37e

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
@@ -547,6 +547,10 @@ else
547547
ifeq ($(shell expr "$(uname_R)" : '2\.'),2)
548548
# MSys2
549549
prefix = /usr/
550+
# Enable DEP
551+
BASIC_LDFLAGS += -Wl,--nxcompat
552+
# Enable ASLR
553+
BASIC_LDFLAGS += -Wl,--dynamicbase
550554
ifeq (MINGW32,$(MSYSTEM))
551555
prefix = /mingw32
552556
BASIC_LDFLAGS += -Wl,--pic-executable,-e,_mainCRTStartup

0 commit comments

Comments
 (0)