+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.
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