diff options
| author | Paul Eggert | 2018-04-17 16:23:16 -0700 |
|---|---|---|
| committer | Paul Eggert | 2018-04-17 16:23:48 -0700 |
| commit | 5dff4905d73d0d42447ff4b114d1af726a689c6a (patch) | |
| tree | c16f884351acf0c7fcdc023604f22dd11e7b88f3 /test/src | |
| parent | 2457d10ebfedbd24040e30e70cca90c6e523afe0 (diff) | |
| download | emacs-5dff4905d73d0d42447ff4b114d1af726a689c6a.tar.gz emacs-5dff4905d73d0d42447ff4b114d1af726a689c6a.zip | |
Fix signal for large integers with valid syntax
* src/lread.c (read_integer): If a radixed integer has valid syntax
but is waayyy too large, signal overflow instead of invalid syntax.
* test/src/lread-tests.el (lread-long-hex-integer): New test.
Diffstat (limited to 'test/src')
| -rw-r--r-- | test/src/lread-tests.el | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/test/src/lread-tests.el b/test/src/lread-tests.el index daf53438811..708701a8887 100644 --- a/test/src/lread-tests.el +++ b/test/src/lread-tests.el | |||
| @@ -194,4 +194,9 @@ literals (Bug#20852)." | |||
| 194 | (lread--substitute-object-in-subtree x 1 t) | 194 | (lread--substitute-object-in-subtree x 1 t) |
| 195 | (should (eq x (cdr x))))) | 195 | (should (eq x (cdr x))))) |
| 196 | 196 | ||
| 197 | (ert-deftest lread-long-hex-integer () | ||
| 198 | (should-error | ||
| 199 | (read "#xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff") | ||
| 200 | :type 'overflow-error)) | ||
| 201 | |||
| 197 | ;;; lread-tests.el ends here | 202 | ;;; lread-tests.el ends here |