Post

Replies

Boosts

Views

Activity

Can you turn off buffer overflow protections?
I am a non-programmer taking a software security course. The current project is dealing with buffer overflows. I've written the sample project in Xcode and it runs fine but shows a SIGABRT error. I'm guessing this is a result of protections that are in place to prevent buffer overflows. Is that correct? If so, how can I turn off those protections to allow my program to run? If not, what is the error? The code I'm using is... #include <stdio.h> #include <strings.h> int main(int argc, char *argv []) {   int access = 0;   char password[8];   char adminpass[8] = "pass123!";         printf("Please enter a password: ");     scanf("%s", password);            if (strncmp (password, adminpass, 8) == 0)       access = 1;     if (access > 0)       printf("Access Granted!\n");         } Thank, in advance for any help anyone can offer!
5
0
1.5k
Mar ’21