Commit graph

428 commits

Author SHA1 Message Date
Andrei Borzenkov
5af859bb77 search_wrap: fix memory leak
Found by: Coverity scan.
CID: 96675
2015-06-20 23:38:19 +03:00
Andrei Borzenkov
2f01f08103 password_pbkdf2: fix memory leak
Found by: Coverity scan.
CID: 96676
2015-06-20 23:38:19 +03:00
Andrei Borzenkov
0fb886cde9 search: fix use after free
Found by: Coverity scan.
CID: 96715
2015-06-20 23:38:17 +03:00
Paul Menzel
f4e62af000 cb_timestamps.c: Add new time stamp descriptions
Add the descriptions of the “core”, that means no vendorcode or payload,
coreboot time stamps added up to coreboot commit a7d92441 (timestamps:
You can never have enough of them!) [1].

Running `coreboot_boottime` in the GRUB command line interface now shows
descriptions for all time stamps again on the ASRock E350M1.

[1] http://review.coreboot.org/9608
2015-05-19 20:28:07 +03:00
Andrei Borzenkov
07258815e9 acpi: do not skip BIOS scan if EBDA length is zero
EBDA layout is not standardized so we cannot assume first two bytes
are length. Neither is it required by ACPI standard. HP 8710W is known
to contain zeroes here.

Closes: 45002
2015-05-08 06:15:16 +03:00
Michael Zimmermann
ed07b7e128 Add missing initializers to silence suprious warnings. 2015-03-27 14:44:41 +01:00
Vladimir Serbinenko
9c07daaf91 cacheinfo: Add missing license information. 2015-03-20 11:13:58 +01:00
Vladimir Serbinenko
e1d4520bfb acpi: Fix unused function warning. 2015-02-22 14:42:43 +01:00
Vladimir Serbinenko
ec65605af4 wildcard: Mark unused argument as such. 2015-02-21 16:19:09 +01:00
Andrei Borzenkov
958167b91c test: fix previous commit - we need to return from subexpression
( ... ) was processed recursively, we need to return from it. Revert
this change.
2015-01-30 20:21:56 +03:00
Andrei Borzenkov
d29259b134 test: do not stop after first file test or closing bracket
Closes: 44115
2015-01-30 20:10:43 +03:00
Andrei Borzenkov
3db4f05a10 commands/parttool: fix memory leak.
Found by: Coverity scan.
2015-01-27 20:55:25 +03:00
Vladimir Serbinenko
4192f2e3d1 commands/acpi: Use ALIGN_UP rather than manual expression.
Improves readability and hopefully automatic scanning.

Found by: Coverity Scan.
2015-01-27 16:32:21 +01:00
Andrei Borzenkov
fb66b512fa commands/fileXX: Fix remaining memory leak.
Found by: Coverity Scan.
2015-01-25 16:36:30 +03: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
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
44461d5af2 grub_cmd_play: Avoid division by zero. 2015-01-21 17:42:10 +01:00
Vladimir Serbinenko
59d4036594 Replace explicit sizeof divisions by ARRAY_SIZE. 2015-01-21 17:37:31 +01:00
Andrei Borzenkov
ebb3d958aa fix memory corruption in pubkey filter over network
grub_pubkey_open closed original file after it was read; it set
io->device to NULL to prevent grub_file_close from trying to close device.
But network device itself is stacked (net -> bufio); and bufio preserved
original netfs file which hold reference to device. grub_file_close(io)
called grub_bufio_close which called grub_file_close for original file.
grub_file_close(netfs-file) now also called grub_device_close which
freed file->device->net. So file structure returned by grub_pubkey_open
now had device->net pointed to freed memory. When later file was closed,
it was attempted to be freed again.

Change grub_pubkey_open to behave like other filters - preserve original
parent file and pass grub_file_close down to parent. In this way only the
original file will close device. We really need to move this logic into
core instead.

Also plug memory leaks in error paths on the way.

Reported-By: Robert Kliewer <robert.kliewer@gmail.com>
Closes: bug #43601
2014-12-05 21:17:08 +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
Valentin Dornauer
0f1f95c7b7 ACPIhalt: Add more ACPI opcodes.
The AML parser implements only a small subset of possible AML
	opcodes. On the Fujitsu Lifebook E744 this and another bug in
	the parser (incorrect handling of TermArg data types) would lead
	to the laptop not turning off (_S5 not found).

	* grub-core/commands/acpihalt.c: Support OpAlias in the AML parser;
	in skip_ext_op(), handle some Type2Opcodes more correctly (TermArgs
	aren't always simply strings!); Add function to skip TermArgs
	* include/grub/acpi.h: Add new opcodes
2014-09-21 18:58:14 +02:00
Vladimir Serbinenko
7c378c3964 * grub-core/commands/keylayouts.c: Ignore unknown keys. 2014-09-21 18:49:49 +02:00
Vladimir Serbinenko
5e42618e00 Fix wrong commit 2014-09-21 18:18:03 +02:00
Michael Chang
0aece00c54 * grub-core/osdep/unix/config.c: Remove extraneous comma. 2014-09-21 17:49:13 +02:00
Роман Пехов
1f6af2a9f8 * grub-core/commands/loadenv.c (check_blocklists): Fix overlap check. 2014-06-22 03:51:50 +04:00
Stephane Rochoy
3f3ec8ef44 * grub-core/commands/efi/lsefisystab.c (grub_cmd_lsefisystab): Show
EFI system table physical address.
2014-06-22 01:34:57 +02:00
Vladimir Serbinenko
2c2c5c720d * grub-core/commands/verify.c (grub_pubkey_open): Trust procfs. 2014-06-21 20:11:08 +02:00
Vladimir Serbinenko
480c89858e * grub-core/commands/verify.c (grub_pubkey_open): Fix memdisk
check.
2014-06-21 20:10:48 +02:00
Vladimir Serbinenko
8063ce197f Replace few instances of memcmp/memcpy in the code that should be grub_memcmp/grub_memcpy. 2014-04-04 07:58:42 +02:00
Vladimir Serbinenko
61c8482b20 Fix several translatable strings.
Suggested by: D. Prévot.
2014-01-24 18:20:27 +01:00
Vladimir Serbinenko
6c519b5c6c * grub-core/commands/macbless.c: Rename FILE and DIR to avoid
conflicts.

	Reported by: Andrey Borzenkov.
2014-01-18 19:26:40 +01:00
Andrey Borzenkov
f371dd5da8 fix include loop on MinGW due to libintl.h pulling stdio.h
In file included from ./include/grub/dl.h:23:0,
                 from grub-core/lib/libgcrypt-grub/cipher/rfc2268.c:3:
./include/grub/list.h:34:18: warning: conflicting types for 'grub_list_push' [en
abled by default]
 void EXPORT_FUNC(grub_list_push) (grub_list_t *head, grub_list_t item);
                  ^
./include/grub/symbol.h:68:25: note: in definition of macro 'EXPORT_FUNC'
 # define EXPORT_FUNC(x) x
                         ^
In file included from ./include/grub/fs.h:30:0,
                 from ./include/grub/file.h:25,
                 from ./grub-core/lib/posix_wrap/stdio.h:23,
                 from c:\mingw\include\libintl.h:314,
                 from ./include/grub/i18n.h:33,
                 from ./include/grub/misc.h:27,
                 from ./include/grub/list.h:25,
                 from ./include/grub/dl.h:28,
                 from grub-core/lib/libgcrypt-grub/cipher/rfc2268.c:3:
./include/grub/partition.h:106:3: note: previous implicit declaration of 'grub_l
ist_push' was here
   grub_list_push (GRUB_AS_LIST_P (&grub_partition_map_list),
   ^
list.h needs just ATTRIBUTE_ERROR from misc.h; split compiler features
into separate file grub/compiler.h and include it instead.
2014-01-18 21:22:57 +04:00
Vladimir Serbinenko
72f099578e Merge branch 'master' of git.sv.gnu.org:/srv/git/grub 2013-12-23 18:17:29 +01:00
Vladimir Serbinenko
a4d610026f ARM64 grub-file and grub-mkconfig support. 2013-12-23 18:17:09 +01:00
Colin Watson
16f7455b04 * configure.ac: Fix spelling.
* grub-core/commands/parttool.c: Fix grammar.
* grub-core/disk/ldm.c: Use consistent capitalisation for "LDM
Embedding Partition".
2013-12-23 13:32:35 +00:00
Vladimir Serbinenko
260632161f Add arm64-efi recognition to grub-file. 2013-12-23 05:33:44 +01:00
Vladimir Serbinenko
4cd0b55fd0 Fix ia64-efi recognition in grub-file. 2013-12-23 05:27:04 +01:00