diff --git a/scsh/syscalls1.c b/scsh/syscalls1.c index 54a8ebd..e9cf887 100644 --- a/scsh/syscalls1.c +++ b/scsh/syscalls1.c @@ -758,6 +758,11 @@ s48_value fcntl_write(s48_value fd, s48_value command, s48_value value) */ s48_value scm_crypt(s48_value key, s48_value salt) { - return s48_enter_string (crypt ( s48_extract_string (key), - s48_extract_string(salt))); + char * ret = crypt (s48_extract_string (key), + s48_extract_string(salt)); + + // FreeBSD does this on error: + if (ret == NULL) return s48_enter_string(""); + + return s48_enter_string (ret); }