Course Solutions Uncategorized (Solved) : Fix Segmentation Fault Core Dumped Code Saw Example Code Online Wanted Add Extra Lines Pla Q29581374 . . . .

(Solved) : Fix Segmentation Fault Core Dumped Code Saw Example Code Online Wanted Add Extra Lines Pla Q29581374 . . . .

 

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]

OR

PayPal Gateway not configured

OR

PayPal Gateway not configured

Leave a Reply

Your email address will not be published. Required fields are marked *

Related Post