aboutsummaryrefslogtreecommitdiffstats
path: root/com32
diff options
context:
space:
mode:
Diffstat (limited to 'com32')
-rw-r--r--com32/gplinclude/vpd/vpd.h2
-rw-r--r--com32/gpllib/vpd/vpd.c2
-rw-r--r--com32/hdt/hdt-cli-vpd.c2
3 files changed, 3 insertions, 3 deletions
diff --git a/com32/gplinclude/vpd/vpd.h b/com32/gplinclude/vpd/vpd.h
index f1dcec68..bff77bd4 100644
--- a/com32/gplinclude/vpd/vpd.h
+++ b/com32/gplinclude/vpd/vpd.h
@@ -25,7 +25,7 @@ typedef struct {
char bios_release_date[9];
char default_flash_filename[13];
char bios_version[255];
- char base_address[6];
+ char base_address[16];
bool filled;
} s_vpd;
diff --git a/com32/gpllib/vpd/vpd.c b/com32/gpllib/vpd/vpd.c
index fd468e4c..6507f0d4 100644
--- a/com32/gpllib/vpd/vpd.c
+++ b/com32/gpllib/vpd/vpd.c
@@ -64,7 +64,7 @@ int vpd_decode(s_vpd * vpd)
for (q = p; q < p + 0x10000; q += 4) {
memcpy(buf, q, 5);
if (memcmp(buf, "\252\125VPD", 5) == 0) {
- snprintf(&vpd->base_address, 5, "%X", q);
+ snprintf(vpd->base_address, sizeof(vpd->base_address), "%p", q);
if (q[5] < 0x30)
return -ENOVPDTABLE;
diff --git a/com32/hdt/hdt-cli-vpd.c b/com32/hdt/hdt-cli-vpd.c
index 4974720b..c2f1c4ef 100644
--- a/com32/hdt/hdt-cli-vpd.c
+++ b/com32/hdt/hdt-cli-vpd.c
@@ -43,7 +43,7 @@ void main_show_vpd(int argc __unused, char **argv __unused,
return;
}
- more_printf("VPD present at address : 0x%s\n", hardware->vpd.base_address);
+ more_printf("VPD present at address : %s\n", hardware->vpd.base_address);
if (strlen(hardware->vpd.bios_build_id) > 0)
more_printf("Bios Build ID : %s\n",
hardware->vpd.bios_build_id);