Changeset 5178ee2 in mainline for uspace/srv/fs/fat/fat_fat.c


Ignore:
Timestamp:
2010-02-10T19:34:05Z (14 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
24a2517
Parents:
16fc3c9
Message:

Harden _fat_get_block() against attempts to read a zero-length file.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/fs/fat/fat_fat.c

    r16fc3c9 r5178ee2  
    147147        fat_cluster_t lastc;
    148148        int rc;
     149
     150        /*
     151         * This function can only operate on non-zero length files.
     152         */
     153        if (firstc == FAT_CLST_RES0)
     154                return ELIMIT;
    149155
    150156        bps = uint16_t_le2host(bs->bps);
Note: See TracChangeset for help on using the changeset viewer.