Commit 4f763ef4 authored by Kevin Wolf's avatar Kevin Wolf
Browse files

iso9660: Fix buffer overflow on unaligned accesses


! iso9660: If we start reading in the middle of a cache block, we must
  not try to copy a whole block, but stop at the end of the cache
  block.
Signed-off-by: Kevin Wolf's avatarKevin Wolf <kevin@tyndur.org>
No related merge requests found
Showing with 1 addition and 1 deletion
+1 -1
......@@ -66,7 +66,7 @@ size_t iso9660_read(struct iso9660_fs_res *res,size_t pos,size_t size,void *buff
break;
}
cur_size = MIN(rem_size, res->voldesc->sector_size);
cur_size = MIN(rem_size, res->voldesc->sector_size - offset);
memcpy(buffer,cache_block->data+offset,cur_size);
cdi_cache_block_release(res->cache,cache_block);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment