Skip to content

Commit b0fbbbb

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 8fde559 commit b0fbbbb

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

0 commit comments

Comments
 (0)