diff options
author | Erwan Velu <erwan.velu@free.fr> | 2009-03-25 18:51:48 +0100 |
---|---|---|
committer | Erwan Velu <erwan.velu@free.fr> | 2009-03-25 18:51:48 +0100 |
commit | 1db6f64a690f66986b79f69642158954317309ea (patch) | |
tree | af9fe9e9c971ef6b1a29c8dcdf541ee1bcbf56f3 | |
parent | f467358a61bdb6cc4cc7b55d46ff3b58fa7dac1a (diff) | |
download | syslinux-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.c | 2 | ||||
-rw-r--r-- | com32/hdt/hdt-menu-vesa.c | 4 |
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++; |