Jacob Garber has uploaded this change for review.

View Change

nb/intel/sandybridge: Set uninitialized run length

If the entire array is zero, then the length of the
longest zero run is the length of the array itself.

Found-by: Coverity Scan, CID 1229715
Signed-off-by: Jacob Garber <jgarber1@ualberta.ca>
Change-Id: Id23292087b14182448d70117915fb044e9c579f7
---
M src/northbridge/intel/sandybridge/raminit_common.c
1 file changed, 1 insertion(+), 0 deletions(-)

git pull ssh://review.coreboot.org:29418/coreboot refs/changes/49/32249/1
diff --git a/src/northbridge/intel/sandybridge/raminit_common.c b/src/northbridge/intel/sandybridge/raminit_common.c
index 55df03b..5ffb0d8 100644
--- a/src/northbridge/intel/sandybridge/raminit_common.c
+++ b/src/northbridge/intel/sandybridge/raminit_common.c
@@ -1142,6 +1142,7 @@
ret.middle = sz / 2;
ret.start = 0;
ret.end = sz;
+ ret.length = sz;
ret.all = 1;
return ret;
}

To view, visit change 32249. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: Id23292087b14182448d70117915fb044e9c579f7
Gerrit-Change-Number: 32249
Gerrit-PatchSet: 1
Gerrit-Owner: Jacob Garber <jgarber1@ualberta.ca>
Gerrit-MessageType: newchange