diff options
author | Gedare Bloom <gedare@rtems.org> | 2013-09-05 13:09:37 -0400 |
---|---|---|
committer | Gedare Bloom <gedare@rtems.org> | 2013-09-05 13:09:37 -0400 |
commit | e4c192655e2847dbc5ad2ca992474a32f2c34ba7 (patch) | |
tree | cdd406d0aec924308b5255b8603c0851dfa256d3 | |
parent | dosfs: Unintentional integer overflow (diff) | |
download | rtems-e4c192655e2847dbc5ad2ca992474a32f2c34ba7.tar.bz2 |
dosfs: Unsigned compared against 0
Fix the type of "cmpltd" to be ssize_t so that assigning it to -1
will terminate processing as intended.
-rw-r--r-- | cpukit/libfs/src/dosfs/msdos_dir.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/cpukit/libfs/src/dosfs/msdos_dir.c b/cpukit/libfs/src/dosfs/msdos_dir.c index 253203cc2d..d7f6823ec9 100644 --- a/cpukit/libfs/src/dosfs/msdos_dir.c +++ b/cpukit/libfs/src/dosfs/msdos_dir.c @@ -78,7 +78,7 @@ msdos_dir_read(rtems_libio_t *iop, void *buffer, size_t count) const size_t buf_size = converter->buffer.size; uint32_t start = 0; ssize_t ret = 0; - uint32_t cmpltd = 0; + ssize_t cmpltd = 0; uint32_t j = 0, i = 0; uint32_t bts2rd = 0; uint32_t cur_cln = 0; |