mirror of
https://gitlab.com/embeddable-common-lisp/ecl.git
synced 2026-02-07 16:10:24 -08:00
Add test for buffer overun in encoding buffer
This commit is contained in:
parent
f106f8b8ad
commit
e439bb5fdd
1 changed files with 16 additions and 0 deletions
|
|
@ -561,3 +561,19 @@
|
|||
(is (equal (multiple-value-list (read-line (make-instance 'character-input-stream :value "a
|
||||
")))
|
||||
'("a" nil))))
|
||||
|
||||
;;;; Author: Tarn W. Burton
|
||||
;;;; Created: 2024-05-19
|
||||
;;;; Description:
|
||||
;;;; Test to ensure that write-char returns the correct value. An
|
||||
;;;; incorrect value or stack smashing indicated a buffer overrun
|
||||
;;;; caused by an encoding buffer that is too small.
|
||||
|
||||
(test mix.0030.write-char-encode-buffer
|
||||
(is (equal (with-open-file (s "/tmp/whatever.txt"
|
||||
:if-does-not-exist :create
|
||||
:if-exists :supersede
|
||||
:external-format :ucs-4
|
||||
:direction :output)
|
||||
(write-char #\a s))
|
||||
#\a)))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue