(bindat--unpack-item): Sanitize vector length
Copyright-paperwork-exempt: yes * lisp/emacs-lisp/bindat.el (bindat--unpack-item): Sanitize vector length
This commit is contained in:
parent
887789eecc
commit
ed43ad5b56
1 changed files with 3 additions and 0 deletions
|
@ -204,6 +204,9 @@
|
|||
('str (bindat--unpack-str len))
|
||||
('strz (bindat--unpack-strz len))
|
||||
('vec
|
||||
(when (> len (length bindat-raw))
|
||||
(error "Vector length %d is greater than raw data length %d."
|
||||
len (length bindat-raw)))
|
||||
(let ((v (make-vector len 0)) (vlen 1))
|
||||
(if (consp vectype)
|
||||
(setq vlen (nth 1 vectype)
|
||||
|
|
Loading…
Add table
Reference in a new issue