Commit graph

3218 commits

Author SHA1 Message Date
Andrei Borzenkov
fb66b512fa commands/fileXX: Fix remaining memory leak.
Found by: Coverity Scan.
2015-01-25 16:36:30 +03: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
dd430afbf8 font: Add missing free.
Found by: Coverity Scan.
2015-01-24 21:55:18 +01:00
Vladimir Serbinenko
d1130afa5f biosdisk: Add missing cast.
Found by: Coverity scan.
2015-01-24 21:50:30 +01:00
Vladimir Serbinenko
7656b72b17 disk/geli: Add missing free.
Found by: Coverity scan.
2015-01-24 21:47:51 +01:00
Vladimir Serbinenko
6f43e350ed disk/geli: Add missing seek success check.
Found by: Coverity scan.
2015-01-24 21:46:23 +01:00
Vladimir Serbinenko
f2baeb194b disk/diskfilter: Add missing lv presence check.
Found by: Coverity scan.
2015-01-24 21:44:27 +01:00
Vladimir Serbinenko
4c7337bfe9 disk/cryptodisk: Add missing error check.
Found by: Coverity scan.
2015-01-24 21:38:22 +01:00
Vladimir Serbinenko
2a8200bba8 disk/ahci: Fix device_map_range argument.
Argument is not used on x86, hence it's gone unnoticed.

Found by: Coverity scan.
2015-01-24 21:37:28 +01:00
Vladimir Serbinenko
7d97335942 disk/AFsplitter: check argument validity before doing any allocs.
This avoids possible memory leaks.

Found by: Coverity scan.
2015-01-24 21:33:30 +01:00
Vladimir Serbinenko
3b1b39c082 commands/wildcard: Add missing free.
Found by: Coverity scan.
2015-01-24 21:29:19 +01:00
Vladimir Serbinenko
37ba761b1c commands/verify: Fix sha1 context zeroing-out.
Current code doesn't zero-out context completely. It's a minor issue
really as sha1 init already takes care of initing the context.
2015-01-24 21:27:10 +01:00
Vladimir Serbinenko
6079e67926 commands/tr: Simplify and fix missing parameter test.
Found by: Coverity scan
2015-01-24 21:25:42 +01:00
Vladimir Serbinenko
fbae51dcea commands/syslinux: Add missing free.
Found by: Coverity scan.
2015-01-24 21:23:25 +01:00
Vladimir Serbinenko
4947f11b09 commands/parttool: Add missing device close.
Found by: Coverity scan.
2015-01-24 21:22:02 +01:00
Vladimir Serbinenko
bd50aa323d commands/nativedisk: Add missing device_close.
Found by: Coverity scan.
2015-01-24 21:18:36 +01:00
Vladimir Serbinenko
72bbd8046a commands/macbless: Handle device opening errors correctly.
Wrong variable was checked for errors.

Found by: Coverity scan.
2015-01-24 21:15:14 +01:00
Vladimir Serbinenko
e3b3e53f72 commands/macbless: Fix potential overflow.
Is a minor concern as no such FS would be created under normal circumstances
and failure was benign.

Found by: Coverity scan.
2015-01-24 21:12:02 +01:00
Vladimir Serbinenko
09e84f188b commands/macbless: Remove incorrect grub_free.
Found by: Coverity Scan
2015-01-24 21:08:50 +01:00
Vladimir Serbinenko
f579f097bb commands/legacycfg: Fix resource leaks. 2015-01-24 21:06:23 +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
68cf24376c commands/hdparm: Add missing grub_disk_close.
Found by: Coverity scan.
2015-01-24 20:55:06 +01:00
Vladimir Serbinenko
9d999852a2 gptsync: Add missing device_close.
Found by: Coverity scan
2015-01-24 20:52:02 +01:00
Vladimir Serbinenko
95a8c9182b commands/fileXX: Fix memory leak.
Found by: Coverity Scan.
2015-01-24 20:50:35 +01:00
Vladimir Serbinenko
b04c6d32ce commands/file: Change the confusing loop stop condition.
Old condition was used to zero-out header variable on exit of the loop.
This is correct but confusing. Replace with in-loop logic.

Found by: Coverity Scan.
2015-01-24 20:47:41 +01:00
Vladimir Serbinenko
e902163e48 commands/acpi: Use ALIGN_UP rather than manual expression.
Improves readability and hopefully automatic scanning.

Found by: Coverity Scan.
2015-01-24 20:41:43 +01:00
Vladimir Serbinenko
9ff9d5a54e uhci: Fix null pointer dereference.
Found by: Coverity scan.
2015-01-24 20:38:12 +01:00
Vladimir Serbinenko
7d027b4d3e efidisk: Return the determined root disk even if partition is unknown. 2015-01-24 19:53:13 +01:00
Andrey Borzenkov
2f73d2733c accept also hdX as alias to native Xen disk name
To be compatible with legacy pv-grub, sort disks by increasing order of handle
value. This allows reusing legacy pv-grub menu.lst which is using hdX names.

Suggested-By: Michael Chang <mchang@suse.com>
Closes: 44026
2015-01-23 19:52:45 +03:00
Felix Janda
3bac4caa2b Remove direct _llseek code and require long filesystem libc. 2015-01-22 19:54:36 +01:00
Vladimir Serbinenko
6866f2ba37 Remove potential division by 0 in gfxmenu. 2015-01-21 17:42:15 +01:00
Vladimir Serbinenko
44b38e4988 grub_menu_init_page: Avoid returning 0 geometry to avoid divisions by 0. 2015-01-21 17:42:15 +01:00
Vladimir Serbinenko
68581b009f unix/cputime.c: Cache sc_clk_tck and check it for sanity. 2015-01-21 17:42:15 +01:00
Vladimir Serbinenko
69aee43fa6 * grub-core/kern/efi/mm.c (grub_efi_get_memory_map): Never return a
descriptor_size==0 to avoid potential divisions by zero.
2015-01-21 17:42:15 +01:00
Vladimir Serbinenko
ac8bac2496 haiku/getroot.c (grub_util_find_partition_start_os): Avoid division by zero. 2015-01-21 17:42:15 +01:00
Vladimir Serbinenko
4e0a25a4c0 rtc_get_time_ms.c (grub_rtc_get_time_ms): Avoid division by zero. 2015-01-21 17:42:14 +01:00
Vladimir Serbinenko
b666e01b9c * grub-core/loader/i386/xnu.c (guessfsb): Avoid division by 0. 2015-01-21 17:42:14 +01:00
Vladimir Serbinenko
2e62352bc2 * grub-core/kern/i386/tsc.c (calibrate_tsc): Ensure that
no division by 0 occurs.
2015-01-21 17:42:14 +01:00
Vladimir Serbinenko
c453760c71 * grub-core/term/gfxterm.c: Avoid division by zero. 2015-01-21 17:42:13 +01:00
Vladimir Serbinenko
e95685dab1 Avoid division by zero in serial. 2015-01-21 17:42:13 +01:00
Vladimir Serbinenko
4816dcac19 * grub-core/video/readers/jpeg.c: Avoid division by zero. 2015-01-21 17:42:13 +01:00
Vladimir Serbinenko
750f4bacd3 * grub-core/disk/diskfilter.c: Validate volumes to avoid division by zero. 2015-01-21 17:42:13 +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
065ed900d4 grub-core/lib/pbkdf2.c (grub_crypto_pbkdf2): Check that hash len is not 0. 2015-01-21 17:42:12 +01:00
Vladimir Serbinenko
111ab3b9cc osdep/linux/blocklist.c (grub_install_get_blocklist): Check blocksize validity. 2015-01-21 17:42:12 +01:00