diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2023-05-12 19:54:47 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2023-05-12 19:54:47 -0700 |
commit | 0cbf1af59cd18c389443d777db6f7e88f8522e52 (patch) | |
tree | 729aa6955e623211520b3fd3839e6be0a345b3e8 /autoload.c | |
parent | a018667b2a6754b24594857db1f8640d8db7eab0 (diff) | |
download | txr-0cbf1af59cd18c389443d777db6f7e88f8522e52.tar.gz txr-0cbf1af59cd18c389443d777db6f7e88f8522e52.tar.bz2 txr-0cbf1af59cd18c389443d777db6f7e88f8522e52.zip |
fix crash if built-in variable is unbound.
We use lookup_var_l in many places to look up the current
dynamic value of a built-in variable such as *stdout*.
Those places assume that a a valid location is returned
which can be subject to a deref. If the application calls
makunbound to remove such a variable, that deref will
crash due to a null pointer dereference.
Possible repro steps are numerous, possible for many variables.
One example:
(makunbound '*stdout*)
(put-line)
* eval.c (lookukp_var_l): If the binding is not found, do
not return a nulloc, but throw an error exception.
Diffstat (limited to 'autoload.c')
0 files changed, 0 insertions, 0 deletions