Buffer Overflow problem (C)

#include <stdio.h> #include <string.h> int main(void) { char buff[15]; buff[14] = 0; printf(“\n Enter the password : \n”); gets(buff); if(strcmp(buff, “password”)) { printf (“\n Wrong Password \n”); } else { printf (“\n Correct Password \n”); buff[14] = 1; } if(buff[14]) { /* Now Give root or admin rights to user*/ printf (“\n Root privileges given to the user \n”); } return 0; } /* Output: … Continue reading Buffer Overflow problem (C)