Eliminate ofpath limits and possible overflows.
* util/ieee1275/ofpath.c (grub_util_info) [STANDALONE]: New function. (OF_PATH_MAX): Removed. (MAX_DISK_CAT): New const. (find_obppath): Use allocated rather than preallocated buffer. Return result. Argument of_path removed. All users updated. Add missing fdstat. (xrealpath): New function. (block_device_get_sysfs_path_and_link): Remove sysfs argument. Allocate rather than use preallocated buffer. All users updated. (__of_path_common): Use allocated rather than preallocatecd buffer. Return result. Argument of_path removed. All users updated. (vendor_is_ATA): Read only needed part form the file. (check_sas): Allocate depending on contents rather than fixed. (main) [STANDALONE]: Handle NULL result.
This commit is contained in:
parent
f990cbf90e
commit
5f47782c29
2 changed files with 138 additions and 104 deletions
19
ChangeLog
19
ChangeLog
|
@ -1,3 +1,22 @@
|
|||
2012-01-29 Vladimir Serbinenko <phcoder@gmail.com>
|
||||
|
||||
Eliminate ofpath limits and possible overflows.
|
||||
|
||||
* util/ieee1275/ofpath.c (grub_util_info) [STANDALONE]: New function.
|
||||
(OF_PATH_MAX): Removed.
|
||||
(MAX_DISK_CAT): New const.
|
||||
(find_obppath): Use allocated rather than preallocated buffer.
|
||||
Return result. Argument of_path removed. All users updated.
|
||||
Add missing fdstat.
|
||||
(xrealpath): New function.
|
||||
(block_device_get_sysfs_path_and_link): Remove sysfs argument.
|
||||
Allocate rather than use preallocated buffer. All users updated.
|
||||
(__of_path_common): Use allocated rather than preallocatecd buffer.
|
||||
Return result. Argument of_path removed. All users updated.
|
||||
(vendor_is_ATA): Read only needed part form the file.
|
||||
(check_sas): Allocate depending on contents rather than fixed.
|
||||
(main) [STANDALONE]: Handle NULL result.
|
||||
|
||||
2012-01-29 Vladimir Serbinenko <phcoder@gmail.com>
|
||||
|
||||
* grub-core/normal/completion.c (iterate_dev): Close the disk.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue