diff options
| author | Glenn Morris | 2020-07-07 07:50:39 -0700 |
|---|---|---|
| committer | Glenn Morris | 2020-07-07 07:50:39 -0700 |
| commit | 3b36b38713aefb3aba40b3c094246782e8893f80 (patch) | |
| tree | 07fa2065252c6cfbe9dc266cfd043071921e321f /src/json.c | |
| parent | 6b80ff3c465f87a31ccaaf41b2b521075f43632d (diff) | |
| parent | 59e768d64ad97782249fda9e53b6adc94c6d0130 (diff) | |
| download | emacs-3b36b38713aefb3aba40b3c094246782e8893f80.tar.gz emacs-3b36b38713aefb3aba40b3c094246782e8893f80.zip | |
Merge from origin/emacs-27
59e768d64a Fix undefined behavior in json.c (Bug#42113)
cce00bef03 Fix ACTION argument of 'display-buffer' call in gud.el
0121db2702 * src/keyboard.c (Fclear_this_command_keys): Doc fix.
b9abf5ceb2 Improve do string of 'man'
b87fc938a0 ; * src/xdisp.c (pos_visible_p): Yet another minor fix for...
Diffstat (limited to 'src/json.c')
| -rw-r--r-- | src/json.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/json.c b/src/json.c index 30027675580..814afc6d741 100644 --- a/src/json.c +++ b/src/json.c | |||
| @@ -365,6 +365,7 @@ lisp_to_json_toplevel_1 (Lisp_Object lisp, | |||
| 365 | Lisp_Object key = HASH_KEY (h, i); | 365 | Lisp_Object key = HASH_KEY (h, i); |
| 366 | if (!EQ (key, Qunbound)) | 366 | if (!EQ (key, Qunbound)) |
| 367 | { | 367 | { |
| 368 | CHECK_STRING (key); | ||
| 368 | Lisp_Object ekey = json_encode (key); | 369 | Lisp_Object ekey = json_encode (key); |
| 369 | /* We can't specify the length, so the string must be | 370 | /* We can't specify the length, so the string must be |
| 370 | NUL-terminated. */ | 371 | NUL-terminated. */ |
| @@ -975,6 +976,7 @@ usage: (json-parse-string STRING &rest ARGS) */) | |||
| 975 | #endif | 976 | #endif |
| 976 | 977 | ||
| 977 | Lisp_Object string = args[0]; | 978 | Lisp_Object string = args[0]; |
| 979 | CHECK_STRING (string); | ||
| 978 | Lisp_Object encoded = json_encode (string); | 980 | Lisp_Object encoded = json_encode (string); |
| 979 | check_string_without_embedded_nuls (encoded); | 981 | check_string_without_embedded_nuls (encoded); |
| 980 | struct json_configuration conf = | 982 | struct json_configuration conf = |