So I open a file, go to the end to see how long it is, and then going back to the beginning causes a segmentation fault (core dumped). What the gosh?
...
FILE *passkey;
passkey = fopen("pass.key", "r+");
fseek(passkey, 0, SEEK_END);
filesize = ftell(passkey);
rewind(passkey);
...
The rewind causes a segmentation fault. It does the same with an fseek to the beginning. Why does it do this?