Vladimir Serbinenko
157f9a9cca
fs/ntfs: Add sizes sanity checks.
...
Found by: Coverity scan.
2015-01-25 20:32:31 +01:00
Vladimir Serbinenko
bc0ecd7104
fs/ntfs: Add missing free.
...
Found by: Coverity scan.
2015-01-25 20:32:31 +01:00
Vladimir Serbinenko
ca793e9c05
fs/minix: Fix sector promotion to 64-bit.
...
While on it make GRUB_MINIX_ZONE2SECT into function.
Found by: Coverity scan
2015-01-25 20:32:31 +01:00
Vladimir Serbinenko
ac602ce700
grub_iso9660_read: Explicitly check read_node return value.
...
Not really needed as grub_errno is already checked but is nicer.
Found by: Coverity scan.
2015-01-25 20:32:31 +01:00
Vladimir Serbinenko
d0af2156c3
fs/hfs: Add pointer sanity checks.
...
Found by: Coverity scan.
2015-01-25 13:18:10 +01:00
Vladimir Serbinenko
4387ca78f0
fs/hfs/hfs_open: Check that mount succeeded.
...
Found by: Coverity scan.
2015-01-25 01:28:17 +01:00
Vladimir Serbinenko
83543f937a
fs/fat: Fix codepath to properly free on error.
...
Found by: Coverity scan.
2015-01-25 01:27:44 +01:00
Vladimir Serbinenko
faad548ce3
fs/cpio_common: Add a sanity check on namesize.
...
Found by: Coverity scan.
2015-01-25 00:11:59 +01:00
Vladimir Serbinenko
b6f21bcb98
fs/cbfs: Add missing free.
...
Found by: Coverity scan.
2015-01-25 00:00:49 +01:00
Vladimir Serbinenko
12a9c52e51
zfs: Fix disk-matching logic.
...
Reported by: Tim Chase <dweeezil>
2015-01-24 20:57:26 +01:00
Vladimir Serbinenko
475bffeae6
* grub-core/fs/zfs.c: Avoid divisions by zero.
2015-01-21 17:42:12 +01:00
Vladimir Serbinenko
9deb46e363
* grub-core/fs/btrfs.c: Avoid divisions by zero.
2015-01-21 17:42:12 +01:00
Vladimir Serbinenko
98f74998d5
* grub-core/fs/hfs.c (grub_hfs_mount): Additional filesystem sanity checks.
2015-01-21 17:42:11 +01:00
Vladimir Serbinenko
5ed3a5d049
* grub-core/fs/minix.c: Additional filesystem sanity checks.
2015-01-21 17:42:11 +01:00
Vladimir Serbinenko
47cd2645dd
* grub-core/fs/ext2.c (grub_ext2_mount): Additional checks for superblock validity.
2015-01-21 17:42:11 +01:00
Vladimir Serbinenko
245e21b2b5
grub_ufs_mount: Check that sblock.ino_per_group is not 0.
2015-01-21 17:42:11 +01:00
Vladimir Serbinenko
9201cd79a3
Reject NILFS2 superblocks with over 1GiB blocks.
...
* grub-core/fs/nilfs2.c (grub_nilfs2_valid_sb): Check that
block size is <= 1GiB.
2015-01-21 17:42:10 +01:00
Vladimir Serbinenko
30e177a05b
grub-core/fs/minix.c (grub_minix_read_file): Avoid reading past the end of file.
2015-01-21 17:42:06 +01:00
Vladimir Serbinenko
af435524cd
grub_fshelp_read_file: Don't attempt to read past the end of file.
2015-01-21 17:38:04 +01:00
Peter Nelson
58f66137a3
* grub-core/fs/ext2.c (grub_ext2_read_block): Support large sparse chunks.
2014-12-07 17:57:49 +01:00
Andrei Borzenkov
03d79a878b
grub-core/fs/zfs/zfsinfo.c: memory leak in print_vdev_info
...
CID: 73635
2014-12-01 20:54:12 +03:00
Andrey Borzenkov
954fe77163
cleanup: grub_cpu_to_XXX_compile_time for constants
...
This tries to catch all cases where grub_cpu_to_XXX was used for constant
expressions (including sizeof).
2014-09-22 20:47:10 +04:00
Michael Chang
54bd9a0610
Fix incorrect address reference in btrfs
...
We encountered a weird random kernel initrd unpacking error on btrfs
and finally found it was caused by incorrect address reference in range
check for type GRUB_BTRFS_EXTENT_REGULAR and the entire result is
unpredictable.
This is a quick fix to make the address reference to the
grub_btrfs_extent_data structure correctly, not the pointer variable
to it.
Any suggestions to this patch is welcome.
2014-09-08 11:33:40 +01:00
Vladimir Serbinenko
33f6ce671f
* grub-core/fs/cbfs.c: Don't probe disks of unknow size.
...
Fixes hang on virtualbox.
2014-08-10 09:50:36 +02:00
Thomas Falcon
4afd0107ef
btrfs: fix get_root key comparison failures due to endianness
...
* grub-core/fs/btrfs.c (get_root): Convert
GRUB_BTRFS_ROOT_VOL_OBJECTID to little-endian.
2014-03-31 15:32:30 +01:00
Vladimir Serbinenko
2e238b3708
Make grub_zlib_decompress handle incomplete chunks.
...
Fixes squash4.
2013-12-18 23:39:49 +01:00
Vladimir Serbinenko
b8765fa082
Implement better integration with Mac firmware.
2013-12-17 15:21:02 +01:00
Vladimir Serbinenko
cc6fb517de
Remove practice of assigning random const pointers to device id.
...
This is not required as cache code already checks driver id as well.
2013-12-16 14:49:11 +01:00
Vladimir Serbinenko
7e47e27bd8
Add gcc_struct to all packed structures when compiling with mingw.
...
Just "packed" doesn't always pack the way we expect.
2013-12-15 14:14:30 +01:00
Vladimir Serbinenko
1a454efe89
Decrease stack usage in BtrFS.
...
We have only 92K of stack and using over 4K per frame is wasteful
* grub-core/fs/btrfs.c (grub_btrfs_lzo_decompress): Allocate on heap
rather than stack.
2013-11-16 16:15:26 +01:00
Vladimir Serbinenko
7b5d51d837
Decrease stack usage in JFS.
...
We have only 92K of stack and using over 4K per frame is wasteful
* grub-core/fs/jfs.c (getblk): Allocate on heap rather than on
stack. Note: this function is recursive.
(grub_jfs_read_inode): Read only part we care about.
2013-11-16 16:00:42 +01:00
Colin Watson
5da5517288
* grub-core/fs/ext2.c (grub_ext2_read_block): Factor out common code for indirect block handling.
...
Saves 185 bytes on compressed image.
2013-11-14 08:13:06 +00:00
Vladimir Serbinenko
81023dbdbd
* grub-core/fs/zfs/zfs.c (ZAP_LEAF_NUMCHUNKS): Use unsigned arithmetics.
2013-11-13 09:27:36 +01:00
Vladimir Serbinenko
3bbeade41d
* grub-core/fs/proc.c: Allow \0 in proc files.
2013-11-12 15:57:09 +01:00
Vladimir Serbinenko
ac8cac1dac
* grub-core/fs/ext2.c: Remove variable length arrays.
2013-11-12 03:04:19 +01:00
Vladimir Serbinenko
9612ebc00e
Add new ports: i386-xen and x86_64-xen. This allows running GRUB in
...
XEN PV environment and load kernels.
2013-11-09 21:29:11 +01:00
Vladimir Serbinenko
8b66bb5d8d
* grub-core/fs/zfs/zfscrypt.c (grub_ccm_decrypt): Return right error
...
type.
(grub_gcm_decrypt): Likewise.
(algo_decrypt): Likewise.
(grub_zfs_decrypt_real): Transform error type.
2013-11-07 00:59:44 +01:00
Vladimir Serbinenko
70bb6c855e
* grub-core/fs/reiserfs.c (grub_reiserfs_iterate_dir): Fix type of
...
entry_type.
2013-11-07 00:48:04 +01:00
Vladimir Serbinenko
bed78ef4e6
Revert "Attempts at ZFS options"
...
It was accidently committed to wrong branch
This reverts commit 0ee5cdfe9f
.
2013-11-03 16:52:33 +01:00
Vladimir Serbinenko
0ee5cdfe9f
Attempts at ZFS options
2013-11-03 16:40:32 +01:00
Vladimir Serbinenko
1397f0b520
* grub-core/fs/fshelp.c (find_file): Save ctx->next when calling
...
find_file recursively for symlink.
2013-11-02 20:29:02 +01:00
Vladimir Serbinenko
f169f65e75
* grub-core/fs/hfspluscomp.c (hfsplus_read_compressed_real): Call
...
file_progress_read_hook.
* grub-core/fs/ntfscomp.c (hfsplus_read_compressed_real): Likewise.
2013-11-02 16:30:53 +01:00
Vladimir Serbinenko
bf0f3a8c3e
* grub-core/fs/tar.c (grub_cpio_read): Add read_hook.
2013-11-01 23:33:59 +01:00
Vladimir Serbinenko
cb72aa1809
Rewrite blocklist functions in order to get progress when
...
reading large extents and decrease amount of blocklist hook calls.
2013-11-01 23:28:03 +01:00
Vladimir Serbinenko
eb03ede014
* grub-core/fs/ext2.c (grub_ext2_read_symlink): Use memcpy rather
...
strncpy.
* grub-core/fs/jfs.c (grub_jfs_lookup_symlink): Likewise.
* grub-core/kern/misc.c (grub_strncpy): Move from here ...
* include/grub/misc.h (grub_strncpy): ... to here. Make inline.
* grub-core/net/net.c (grub_net_addr_to_str): Use COMPILE_TIME_ASSERT
+ strcpy rather than strncpy.
2013-11-01 18:44:46 +01:00
Vladimir Serbinenko
8fbe5c7df7
* grub-core/fs/zfs/zfs.c (nvpair_name): Use correct type for size.
...
(check_pool_label): Likewise. Fixes overflow.
(nvlist_find_value): Fix comparison.
2013-11-01 18:41:52 +01:00
Vladimir Serbinenko
e54b8f536b
* include/grub/misc.h (grub_strcat): Removed. All users changed to
...
more appropriate functions.
2013-11-01 16:27:37 +01:00
Vladimir Serbinenko
82591fa6e7
Make / in btrfs refer to real root, not the default volume.
...
Modify mkrelpath to work even if device is mounted with subvolid option.
2013-10-28 01:37:19 +01:00
Vladimir Serbinenko
2a8a75855c
* grub-core/fs/iso9660.c: Replace strncat with memcpy.
...
* include/grub/misc.h: Remove strncat.
* grub-core/lib/posix_wrap/string.h: Likewise.
2013-10-26 12:49:51 +02:00
Vladimir Serbinenko
fb56391ee3
* grub-core/fs/zfs/zfs.c (xor_out): Use unsigned modular arithmetics
...
rather than signed one.
(recovery): Likewise.
2013-10-25 20:31:04 +02:00