Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

crypt() invokes coredump in interpreter.c #3

Open
sshine opened this issue Mar 28, 2019 · 0 comments
Open

crypt() invokes coredump in interpreter.c #3

sshine opened this issue Mar 28, 2019 · 0 comments
Assignees

Comments

@sshine
Copy link
Owner

sshine commented Mar 28, 2019

On my computer, but not on @gpiedimonte's, crypt() causes a coredump when entering one's password for the first time. (This was discovered in #2.)

The problem lines in interpreter.c are:

1182:strncpy(d->pwd, crypt(arg, d->character->player.name), 10);
1380:strncpy(d->pwd, crypt(arg, d->character->player.name), 10);

crypt() doesn't return a NULL pointer; trying to print its output in gdb gives:

$1 = 0xfffffffff7dd41e0 <error: Cannot access memory at address 0xfffffffff7dd41e0>
@sshine sshine self-assigned this Mar 28, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant