Changeset 5322d6e in rtems


Ignore:
Timestamp:
Apr 13, 2010, 4:17:15 AM (10 years ago)
Author:
Ralf Corsepius <ralf.corsepius@…>
Branches:
4.10, 4.11, master
Children:
d3d29749
Parents:
4d0771e
Message:

2010-04-13 Ralf Corsépius <ralf.corsepius@…>

  • shttpd/io_dir.c: Cast consts to size_t (Avoid overflows on implicit const casts on 16bit targets).
Location:
cpukit
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • cpukit/ChangeLog

    r4d0771e r5322d6e  
     12010-04-13      Ralf Corsépius <ralf.corsepius@rtems.org>
     2
     3        * shttpd/io_dir.c: Cast consts to size_t (Avoid overflows on implicit
     4        const casts on 16bit targets).
     5
    162010-04-12      Ralf Corsépius <ralf.corsepius@rtems.org>
    27
  • cpukit/shttpd/io_dir.c

    r4d0771e r5322d6e  
    8080                                (void) my_snprintf(size, sizeof(size),
    8181                                    "%lu", (unsigned long) st.st_size);
    82                         else if (st.st_size < 1024 * 1024)
     82                        else if (st.st_size < ((size_t)1024 * (size_t)1024))
    8383                                (void) my_snprintf(size, sizeof(size), "%luk",
    8484                                    (unsigned long) (st.st_size >> 10)  + 1);
Note: See TracChangeset for help on using the changeset viewer.