diff options
| author | Eli Zaretskii | 2006-05-16 18:28:40 +0000 |
|---|---|---|
| committer | Eli Zaretskii | 2006-05-16 18:28:40 +0000 |
| commit | 7893e58999ad286bfe435c4525f5cbe070cb855a (patch) | |
| tree | ee547c662a4625aade50e4d89839a7efd8841c85 | |
| parent | d749491187cdd71459fd5a5e3521fe61556d6860 (diff) | |
| download | emacs-7893e58999ad286bfe435c4525f5cbe070cb855a.tar.gz emacs-7893e58999ad286bfe435c4525f5cbe070cb855a.zip | |
(archive-arc-summarize, archive-lzh-summarize): Convert csize to integer when
computing offsets within the compressed archive file.
| -rw-r--r-- | lisp/ChangeLog | 6 | ||||
| -rw-r--r-- | lisp/arc-mode.el | 14 |
2 files changed, 17 insertions, 3 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 147e449c351..1f7f52b637b 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,9 @@ | |||
| 1 | 2006-05-16 Eli Zaretskii <eliz@gnu.org> | ||
| 2 | |||
| 3 | * arc-mode.el (archive-arc-summarize, archive-lzh-summarize): | ||
| 4 | Convert csize to integer when computing offsets within the | ||
| 5 | compressed archive file. | ||
| 6 | |||
| 1 | 2006-05-16 Kim F. Storm <storm@cua.dk> | 7 | 2006-05-16 Kim F. Storm <storm@cua.dk> |
| 2 | 8 | ||
| 3 | * subr.el (add-to-history): Add KEEP-ALL arg and align functionality | 9 | * subr.el (add-to-history): Add KEEP-ALL arg and align functionality |
diff --git a/lisp/arc-mode.el b/lisp/arc-mode.el index 96b41eca88d..0b016b981e2 100644 --- a/lisp/arc-mode.el +++ b/lisp/arc-mode.el | |||
| @@ -1355,7 +1355,11 @@ This doesn't recover lost files, it just undoes changes in the buffer itself." | |||
| 1355 | visual) | 1355 | visual) |
| 1356 | files (cons (vector efnname ifnname fiddle nil (1- p)) | 1356 | files (cons (vector efnname ifnname fiddle nil (1- p)) |
| 1357 | files) | 1357 | files) |
| 1358 | p (+ p 29 csize)))) | 1358 | ;; p needs to stay an integer, since we use it in char-after |
| 1359 | ;; above. Passing through `round' limits the compressed size | ||
| 1360 | ;; to most-positive-fixnum, but if the compressed size exceeds | ||
| 1361 | ;; that, we cannot visit the archive anyway. | ||
| 1362 | p (+ p 29 (round csize))))) | ||
| 1359 | (goto-char (point-min)) | 1363 | (goto-char (point-min)) |
| 1360 | (let ((dash (concat "- -------- ----------- -------- " | 1364 | (let ((dash (concat "- -------- ----------- -------- " |
| 1361 | (make-string maxlen ?-) | 1365 | (make-string maxlen ?-) |
| @@ -1497,9 +1501,13 @@ This doesn't recover lost files, it just undoes changes in the buffer itself." | |||
| 1497 | files (cons (vector prname ifnname fiddle mode (1- p)) | 1501 | files (cons (vector prname ifnname fiddle mode (1- p)) |
| 1498 | files)) | 1502 | files)) |
| 1499 | (cond ((= hdrlvl 1) | 1503 | (cond ((= hdrlvl 1) |
| 1500 | (setq p (+ p hsize 2 csize))) | 1504 | ;; p needs to stay an integer, since we use it in goto-char |
| 1505 | ;; above. Passing through `round' limits the compressed size | ||
| 1506 | ;; to most-positive-fixnum, but if the compressed size exceeds | ||
| 1507 | ;; that, we cannot visit the archive anyway. | ||
| 1508 | (setq p (+ p hsize 2 (round csize)))) | ||
| 1501 | ((or (= hdrlvl 2) (= hdrlvl 0)) | 1509 | ((or (= hdrlvl 2) (= hdrlvl 0)) |
| 1502 | (setq p (+ p thsize 2 csize)))) | 1510 | (setq p (+ p thsize 2 (round csize))))) |
| 1503 | )) | 1511 | )) |
| 1504 | (goto-char (point-min)) | 1512 | (goto-char (point-min)) |
| 1505 | (set-buffer-multibyte default-enable-multibyte-characters) | 1513 | (set-buffer-multibyte default-enable-multibyte-characters) |