summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErwan Velu <erwan.velu@free.fr>2009-03-25 18:51:48 +0100
committerErwan Velu <erwan.velu@free.fr>2009-03-25 18:51:48 +0100
commit1db6f64a690f66986b79f69642158954317309ea (patch)
treeaf9fe9e9c971ef6b1a29c8dcdf541ee1bcbf56f3
parentf467358a61bdb6cc4cc7b55d46ff3b58fa7dac1a (diff)
downloadsyslinux-1db6f64a690f66986b79f69642158954317309ea.tar.gz
hdt: Fixing output of vesa software revision
Impact: Vesa's software revision was misdisplayed and could lead to corruption Displaying an int with %s isn't a good idea ;o)
-rw-r--r--com32/hdt/hdt-cli-vesa.c2
-rw-r--r--com32/hdt/hdt-menu-vesa.c4
2 files changed, 3 insertions, 3 deletions
diff --git a/com32/hdt/hdt-cli-vesa.c b/com32/hdt/hdt-cli-vesa.c
index e6843eea..db7642d2 100644
--- a/com32/hdt/hdt-cli-vesa.c
+++ b/com32/hdt/hdt-cli-vesa.c
@@ -44,7 +44,7 @@ void main_show_vesa(struct s_hardware *hardware) {
more_printf(" Vendor : %s\n",hardware->vesa.vendor);
more_printf(" Product : %s\n",hardware->vesa.product);
more_printf(" Product rev. : %s\n",hardware->vesa.product_revision);
- more_printf(" Software rev.: %s\n",hardware->vesa.software_rev);
+ more_printf(" Software rev.: %d\n",hardware->vesa.software_rev);
more_printf(" Memory (KB) : %d\n",hardware->vesa.total_memory*64);
more_printf(" Modes : %d\n",hardware->vesa.vmi_count);
}
diff --git a/com32/hdt/hdt-menu-vesa.c b/com32/hdt/hdt-menu-vesa.c
index 345d74bb..2d807aaa 100644
--- a/com32/hdt/hdt-menu-vesa.c
+++ b/com32/hdt/hdt-menu-vesa.c
@@ -58,8 +58,8 @@ static void compute_vesa_card(struct s_my_menu *menu, struct s_hardware *hardwar
add_item(buffer,statbuffer,OPT_INACTIVE,NULL,0);
menu->items_count++;
- snprintf(buffer,sizeof buffer,"Software Rev: %s",hardware->vesa.software_rev);
- snprintf(statbuffer,sizeof statbuffer,"Software Revision: %s",hardware->vesa.software_rev);
+ snprintf(buffer,sizeof buffer,"Software Rev: %d",hardware->vesa.software_rev);
+ snprintf(statbuffer,sizeof statbuffer,"Software Revision: %d",hardware->vesa.software_rev);
add_item(buffer,statbuffer,OPT_INACTIVE,NULL,0);
menu->items_count++;