fixed possible memory leaks

This commit is contained in:
Václav Šmejkal 2022-04-26 19:04:43 +02:00
parent 8b822bae1c
commit 827a2a24e2
2 changed files with 9 additions and 1 deletions

View File

@ -16,6 +16,10 @@ decryptText(char *text, char *key)
exit(INVALID_KEY);
}
//REDEFINE KEY_LENGTH
#undef KEY_LENGTH
#define KEY_LENGTH strlen(key)
//VARIABLES
char *returningText;
int numberBuffer;

View File

@ -34,6 +34,10 @@ encryptText(char *text, char *keyNew)
strcpy(key, keyNew);
//REDEFINE KEY_LENGTH
/*#undef KEY_LENGTH
#define KEY_LENGTH strlen(key)*/
goto skipKey;
}