mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-01-01 01:41:01 -08:00
(Ffile_attributes): Don't allow the device number become negative.
This commit is contained in:
parent
83affd963e
commit
7412d42903
2 changed files with 10 additions and 2 deletions
|
|
@ -1,3 +1,8 @@
|
|||
2008-05-03 Eli Zaretskii <eliz@gnu.org>
|
||||
|
||||
* dired.c (Ffile_attributes): Don't allow the device number become
|
||||
negative.
|
||||
|
||||
2008-05-02 Daiki Ueno <ueno@unixuser.org>
|
||||
|
||||
* Makefile.in (lisp, shortlisp): Add epa-file-hook.elc.
|
||||
|
|
|
|||
|
|
@ -1048,8 +1048,11 @@ Elements of the attribute list are:
|
|||
make_number (low_ino & 0xffff)));
|
||||
}
|
||||
|
||||
/* Likewise for device. */
|
||||
if (FIXNUM_OVERFLOW_P (s.st_dev))
|
||||
/* Likewise for device, but don't let it become negative. We used
|
||||
to use FIXNUM_OVERFLOW_P here, but that won't catch large
|
||||
positive numbers such as 0xFFEEDDCC. */
|
||||
if ((EMACS_INT)s.st_dev < 0
|
||||
|| (EMACS_INT)s.st_dev > MOST_POSITIVE_FIXNUM)
|
||||
values[11] = Fcons (make_number (s.st_dev >> 16),
|
||||
make_number (s.st_dev & 0xffff));
|
||||
else
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue