projects
/
emacs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
afc214f
)
Protect add-variable-watcher from incorrect usage
author
Eli Zaretskii
<eliz@gnu.org>
Mon, 29 Mar 2021 10:39:43 +0000
(13:39 +0300)
committer
Eli Zaretskii
<eliz@gnu.org>
Mon, 29 Mar 2021 10:39:43 +0000
(13:39 +0300)
* src/data.c (Fadd_variable_watcher): Avoid crashes if SYMBOL
isn't. (Bug#47462)
src/data.c
patch
|
blob
|
history
diff --git
a/src/data.c
b/src/data.c
index 0fa491b17a114bd745664bd944fa6dc108e69725..3667b03c0e41dff762587a739deeb3848de5436c 100644
(file)
--- a/
src/data.c
+++ b/
src/data.c
@@
-1589,6
+1589,7
@@
All writes to aliases of SYMBOL will call WATCH-FUNCTION too. */)
(Lisp_Object symbol, Lisp_Object watch_function)
{
symbol = Findirect_variable (symbol);
+ CHECK_SYMBOL (symbol);
set_symbol_trapped_write (symbol, SYMBOL_TRAPPED_WRITE);
map_obarray (Vobarray, harmonize_variable_watchers, symbol);