diff options
author | Ralf Corsepius <ralf.corsepius@rtems.org> | 2010-04-13 04:17:15 +0000 |
---|---|---|
committer | Ralf Corsepius <ralf.corsepius@rtems.org> | 2010-04-13 04:17:15 +0000 |
commit | 5322d6e604d745fb59c3bb5688a7df50b5277e1e (patch) | |
tree | 05ed8c196ccd28bfc940a46f57acf44b86c4b606 /cpukit/shttpd | |
parent | 2010-04-12 Ralf Corsépius <ralf.corsepius@rtems.org> (diff) | |
download | rtems-5322d6e604d745fb59c3bb5688a7df50b5277e1e.tar.bz2 |
2010-04-13 Ralf Corsépius <ralf.corsepius@rtems.org>
* shttpd/io_dir.c: Cast consts to size_t (Avoid overflows on implicit
const casts on 16bit targets).
Diffstat (limited to 'cpukit/shttpd')
-rw-r--r-- | cpukit/shttpd/io_dir.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/cpukit/shttpd/io_dir.c b/cpukit/shttpd/io_dir.c index 0534c623a2..ab331c7fc7 100644 --- a/cpukit/shttpd/io_dir.c +++ b/cpukit/shttpd/io_dir.c @@ -79,7 +79,7 @@ read_dir(struct stream *stream, void *buf, size_t len) if (st.st_size < 1024) (void) my_snprintf(size, sizeof(size), "%lu", (unsigned long) st.st_size); - else if (st.st_size < 1024 * 1024) + else if (st.st_size < ((size_t)1024 * (size_t)1024)) (void) my_snprintf(size, sizeof(size), "%luk", (unsigned long) (st.st_size >> 10) + 1); else |