Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:wenbowang
grub
0001-efi-allocate-size-of-struct-instead-of-siz...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 0001-efi-allocate-size-of-struct-instead-of-size-of-point.patch of Package grub
From 34432b14a5ece805d478c575e5091779e2ed149a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=A1clav=20Pavl=C3=ADn?= <vpavlin@redhat.com> Date: Tue, 8 Oct 2013 12:26:50 +0200 Subject: [PATCH] efi: allocate size of struct instead of size of pointer --- efi/efigraph.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/efi/efigraph.c b/efi/efigraph.c index e0cfe5a..c1b8e31 100644 --- a/efi/efigraph.c +++ b/efi/efigraph.c @@ -1392,10 +1392,10 @@ enable(struct graphics_backend *backend) memset(eg->modes, '\0', eg->max_mode * sizeof (void *)); for (i = 0; i < eg->max_mode; i++) { - eg->modes[i] = grub_malloc(sizeof eg->modes[0]); + eg->modes[i] = grub_malloc(sizeof (*(eg->modes[0]))); if (!eg->modes[i]) goto fail; - memset(eg->modes[i], '\0', sizeof (eg->modes[0])); + memset(eg->modes[i], '\0', sizeof (*(eg->modes[0]))); eg->modes[i]->number = i; efi_status = Call_Service_4(eg->output_intf->query_mode, -- 1.8.3.1
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor