Changeset b33d140 in mainline
- Timestamp:
- 2017-08-26T21:59:30Z (7 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 8ebc5b8a
- Parents:
- ac415d50
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/label/src/gpt.c
rac415d50 rb33d140 99 99 uint8_t *etable[2]; 100 100 size_t bsize; 101 aoff64_t nblocks; 101 102 uint32_t num_entries; 102 103 uint32_t esize; … … 123 124 } 124 125 126 rc = bd->ops->get_nblocks(bd->arg, &nblocks); 127 if (rc != EOK) { 128 rc = EIO; 129 goto error; 130 } 131 125 132 if (bsize < 512 || (bsize % 512) != 0) { 126 133 rc = EINVAL; … … 147 154 148 155 h1ba = uint64_t_le2host(gpt_hdr[0]->alternate_lba); 156 157 if (h1ba >= nblocks) { 158 rc = EINVAL; 159 goto error; 160 } 149 161 150 162 rc = bd->ops->read(bd->arg, h1ba, 1, gpt_hdr[1]);
Note:
See TracChangeset
for help on using the changeset viewer.