diff --git a/src/core/lib/decrypter.c b/src/core/lib/decrypter.c index 7f50969..11c5ea0 100644 --- a/src/core/lib/decrypter.c +++ b/src/core/lib/decrypter.c @@ -97,7 +97,7 @@ why2_output_flags why2_decrypt_text(char *text, char *keyNew) numberBuffer++; } - textBuffer = realloc(textBuffer, numberBuffer + 1); + textBuffer = why2_realloc(textBuffer, numberBuffer + 1); //CLEAN (POSSIBLY EXISTING) JUNK in textBuffer for (int j = 0; j <= numberBuffer; j++) diff --git a/src/core/lib/encrypter.c b/src/core/lib/encrypter.c index 175d7d3..81f6f0c 100644 --- a/src/core/lib/encrypter.c +++ b/src/core/lib/encrypter.c @@ -98,7 +98,7 @@ why2_output_flags why2_encrypt_text(char *text, char *keyNew) { numberBuffer = sizeof(int) * why2_count_int_length(textKeyChain[i]); - textBuffer = realloc(textBuffer, numberBuffer); + textBuffer = why2_realloc(textBuffer, numberBuffer); sprintf(textBuffer, "%d", textKeyChain[i]); @@ -106,7 +106,7 @@ why2_output_flags why2_encrypt_text(char *text, char *keyNew) if (i != (int) strlen(text) - 1) { - textBuffer = realloc(textBuffer, 2); + textBuffer = why2_realloc(textBuffer, 2); sprintf(textBuffer, "%c", why2_get_encryption_separator()); strcat(returningText, textBuffer); diff --git a/src/core/lib/test/main.c b/src/core/lib/test/main.c index d4fb315..d82d908 100644 --- a/src/core/lib/test/main.c +++ b/src/core/lib/test/main.c @@ -85,7 +85,7 @@ int main(void) { statusBuffer = strdup("failed"); - outputBuffer = realloc(outputBuffer, strlen(encrypted.outputText) + 6); + outputBuffer = why2_realloc(outputBuffer, strlen(encrypted.outputText) + 6); sprintf(outputBuffer, "\t\t\"%s\"\n", encrypted.outputText); outputStreamBuffer = stderr;