Commit 7412d429 authored by Eli Zaretskii's avatar Eli Zaretskii
Browse files

(Ffile_attributes): Don't allow the device number become negative.

parent 83affd96
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
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment