summaryrefslogtreecommitdiffstats
path: root/txr.1
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2022-10-31 07:18:41 -0700
committerKaz Kylheku <kaz@kylheku.com>2022-10-31 07:18:41 -0700
commit00d7b468e94d23646bb58b1774f5bec33b7c9fb1 (patch)
treef694ebdf6167de879ea9614279bf51b50297ac4e /txr.1
parent746dddd01f28dc4499825c855c42aa5e95d5055a (diff)
downloadtxr-00d7b468e94d23646bb58b1774f5bec33b7c9fb1.tar.gz
txr-00d7b468e94d23646bb58b1774f5bec33b7c9fb1.tar.bz2
txr-00d7b468e94d23646bb58b1774f5bec33b7c9fb1.zip
crypt: remove dubious validator.
The validate_salt function was introduced in commit c3a0ceb2cea1a9d43f2baf5a2e63d0d712c8df19, February 2020. I cannot reproduce the internal crash in crypt which it alleges, and I neglected to mention the bad inputs in the commit or add tests. I'm not able to reproduce the alleged behavior in spite of trying all sorts of bad inputs; and looking at the crypt source in glibc, I don't see any obvious problem. And so, on this Halowe'en, we exorcise the ghost that has been haunting the crypt. * sysif.c (salt_char_p, validate_salt): Static functions removed. (crypt_wrap): Don't call validate_salt, and so cwsalt need not be tested for null. * tests/018/crypt.tl: New file. * txr.1: Mention that crypt_r is used if available, which avoids static storage.
Diffstat (limited to 'txr.1')
-rw-r--r--txr.19
1 files changed, 7 insertions, 2 deletions
diff --git a/txr.1 b/txr.1
index 959dbe33..d6278481 100644
--- a/txr.1
+++ b/txr.1
@@ -72856,8 +72856,13 @@ platform function. The hash value is assumed to be UTF-8 and converted to
Unicode characters, though it is not expected to contain anything but 7
bit ASCII characters.
-Note: the underlying C library function uses a static buffer for its return
-value. The return value of the \*(TL function is a copy of that buffer.
+Note: if C library function
+.code crypt
+uses a static buffer for its return value. If that function is used,
+the Lisp string returned by the \*(TL function carries its own copy of
+that buffer. Where available, the
+.code crypt_r
+function is used which avoids static storage.
.SS* Unix Signal Handling