[coreboot-gerrit] New patch to review for coreboot: intel/gma/vbt.c: pad the ID string with spaces.
Arthur Heymans (arthur@aheymans.xyz)
gerrit at coreboot.org
Sun Sep 25 22:42:03 CEST 2016
Arthur Heymans (arthur at aheymans.xyz) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/16739
-gerrit
commit 3e68463212005aab57b062fac7666d4a39799d56
Author: Arthur Heymans <arthur at aheymans.xyz>
Date: Sun Sep 25 22:36:26 2016 +0200
intel/gma/vbt.c: pad the ID string with spaces.
The VBT id string is 20 characters long.
If the string is shorter than 20 it needs spaces at the end.
Change-Id: Id6439f1d3dbd09319ee99ce9d15dbc3bcead1f53
Signed-off-by: Arthur Heymans <arthur at aheymans.xyz>
---
src/drivers/intel/gma/vbt.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/src/drivers/intel/gma/vbt.c b/src/drivers/intel/gma/vbt.c
index e768402..097f511 100644
--- a/src/drivers/intel/gma/vbt.c
+++ b/src/drivers/intel/gma/vbt.c
@@ -25,16 +25,18 @@
#include "intel_bios.h"
static size_t generate_vbt(const struct i915_gpu_controller_info *conf,
- void *vbt, const char *idstr)
+ void *vbt, const char *idstr_in)
{
struct vbt_header *head = vbt;
struct bdb_header *bdb_head;
struct bdb_general_features *genfeat;
u8 *ptr;
+ char idstr[20];
memset (head, 0, sizeof (*head));
+ memset(idstr, ' ', sizeof(idstr));
- memcpy (head->signature, idstr, 20);
+ memcpy(head->signature, strncpy(idstr, idstr_in, 20), 20);
head->version = 100;
head->header_size = sizeof (*head);
head->bdb_offset = sizeof (*head);
More information about the coreboot-gerrit
mailing list