moved fileBuffer deallocation to beggining of encrypter
it for some reason threw segfault
This commit is contained in:
parent
cfb55cd493
commit
d63c97614f
@ -25,6 +25,7 @@ outputFlags encryptText(char *text, char *keyNew, inputFlags flags)
|
||||
fileBuffer = fopen("/dev/urandom", "r");
|
||||
fread(&numberBuffer, 4, 1, fileBuffer);
|
||||
srand(numberBuffer);
|
||||
fclose(fileBuffer);
|
||||
|
||||
if (keyNew != NULL)
|
||||
{
|
||||
@ -112,7 +113,6 @@ outputFlags encryptText(char *text, char *keyNew, inputFlags flags)
|
||||
};
|
||||
|
||||
//DEALLOCATION
|
||||
fclose(fileBuffer);
|
||||
free(textKeyChain);
|
||||
free(textBuffer);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user