[misc] enable ASLR for MinGW builds

* ASLR is enabled by default for Visual Studio builds but that isn't the case
  for MinGW builds. Fix that and also add -Wformat-security while we're at it.
* Closes #1518
* Also ensure that we'll never write protective MBR message for non-bootable
  GPT drives, even as we are not calling WriteSBR() for those anyway.
This commit is contained in:
Pete Batard 2020-04-23 16:48:37 +01:00
parent 0085c4a464
commit 44a8e08bc6
No known key found for this signature in database
GPG key ID: 38E0CF5E69EDD671
5 changed files with 13 additions and 11 deletions

View file

@ -923,7 +923,7 @@ static BOOL WriteSBR(HANDLE hPhysicalDrive)
}
// Use BT_MAX for the protective message
if (partition_type == PARTITION_STYLE_GPT)
if ((boot_type != BT_NON_BOOTABLE) && (partition_type == PARTITION_STYLE_GPT))
sub_type = BT_MAX;
switch (sub_type) {