From 54e227efdf2d03d9d0654296f8ac3a379d5cc851 Mon Sep 17 00:00:00 2001 From: Patrick Georgi Date: Sat, 8 Aug 2015 22:02:12 +0200 Subject: intel/i945: don't read structs out of uninitialized pointers Change-Id: I7f17cd1418f05ff3e8cd559eca6ec3ce7f9bfb79 Signed-off-by: Patrick Georgi Reviewed-on: http://review.coreboot.org/11139 Tested-by: build bot (Jenkins) Reviewed-by: Paul Menzel Reviewed-by: Stefan Reinauer --- src/northbridge/intel/i945/gma.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/northbridge') diff --git a/src/northbridge/intel/i945/gma.c b/src/northbridge/intel/i945/gma.c index a2e51636db..437b6ce758 100644 --- a/src/northbridge/intel/i945/gma.c +++ b/src/northbridge/intel/i945/gma.c @@ -496,6 +496,9 @@ intel_gma_get_controller_info(void) return NULL; } struct northbridge_intel_i945_config *chip = dev->chip_info; + if (!chip) { + return NULL; + } return &chip->gfx; } -- cgit v1.2.3