How to fix segmentation fault(core dumped) in this code
I saw example code online and wanted to add some extra lines toplay around with the program. Instead of passing the same characterpointer message i wanted to get the message string from user input.I also added a line so i can see the decrypted message but thisline seems to throw segmentation fault(core dumped) error when irun it. Here is code:
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
char* encryptPass(char* message, char* key) {
size_t messagelen = strlen(message);
size_t keylen = strlen(key);
char * encrypted = malloc(messagelen+1);
int i;
for(i = 0; i < messagelen; i++) {
encrypted[i]
PayPal Gateway not configured
PayPal Gateway not configured