; Avoid recent tar-mode.el constant mutation
* lisp/tar-mode.el (tar-attr-vector): Initialize with fresh vector to avoid constant vector mutation (bug#64686). (tar-parse-pax-extended-header): Use fillarray.
This commit is contained in:
parent
8c3338f6ba
commit
6479e8758d
1 changed files with 2 additions and 3 deletions
|
@ -255,15 +255,14 @@ Only attributes that `tar-mode' can grok are mentioned.")
|
|||
(decode-coding-string str coding)
|
||||
str))
|
||||
|
||||
(defvar tar-attr-vector '[nil nil nil nil nil nil nil nil])
|
||||
(defvar tar-attr-vector (make-vector 8 nil))
|
||||
(defun tar-parse-pax-extended-header (pos)
|
||||
"Parse a pax external header of a Posix-format tar file."
|
||||
(let ((end (+ pos 512))
|
||||
(result tar-attr-vector)
|
||||
(coding 'utf-8-unix)
|
||||
attr value record-len value-len)
|
||||
(dotimes (i 8)
|
||||
(aset result i nil))
|
||||
(fillarray result nil)
|
||||
(goto-char pos)
|
||||
(while (and (< pos end)
|
||||
(re-search-forward pax-extended-attribute-record-regexp
|
||||
|
|
Loading…
Add table
Reference in a new issue