Changeset 7a3529a8 in mainline


Ignore:
Timestamp:
2024-12-28T20:31:24Z (5 months ago)
Author:
Miroslav Cimerman <mc@…>
Children:
685c0ab
Parents:
723f1d9
Message:

hr: util.c: bounds check on state updates

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/bd/hr/util.c

    r723f1d9 r7a3529a8  
    213213void hr_update_ext_status(hr_volume_t *vol, size_t extent, hr_ext_status_t s)
    214214{
     215        assert(extent < vol->extent_no);
     216
    215217        hr_ext_status_t old = vol->extents[extent].status;
    216218        HR_WARN("\"%s\": changing extent %lu state: %s -> %s\n",
     
    222224void hr_update_hotspare_status(hr_volume_t *vol, size_t hs, hr_ext_status_t s)
    223225{
     226        assert(hs < vol->hotspare_no);
     227
    224228        hr_ext_status_t old = vol->hotspares[hs].status;
    225229        HR_WARN("\"%s\": changing hotspare %lu state: %s -> %s\n",
Note: See TracChangeset for help on using the changeset viewer.