Ensure sliding window buffer is 0 initialized

Avoids data leakage for invalid backreference to non-written output in
deflate streams.
This commit is contained in:
2023-05-22 09:18:13 +02:00
parent dbdeb3825a
commit 37b8d92872

View File

@ -197,7 +197,7 @@
(defstruct sliding-window-stream
(stream nil :type stream :read-only t)
(buffer (make-array +sliding-window-size+ :element-type '(unsigned-byte 8))
(buffer (make-array +sliding-window-size+ :element-type '(unsigned-byte 8) :initial-element 0)
:type (simple-array (unsigned-byte 8) (#.+sliding-window-size+)) :read-only t)
(buffer-end 0 :type fixnum)
(checksum nil :type symbol :read-only t)