diff options
author | Erwan Velu <erwanaliasr1@gmail.com> | 2011-09-22 22:44:53 +0200 |
---|---|---|
committer | Erwan Velu <erwanaliasr1@gmail.com> | 2011-09-22 22:44:53 +0200 |
commit | 7e301945d8a3d5b99fbac741a769e6dc15d527f9 (patch) | |
tree | d85d8c7be763dfd1447895a28949f78e7661f5b8 | |
parent | 51431d2c9992a99f58378056523256757edb0fb3 (diff) | |
download | syslinux-7e301945d8a3d5b99fbac741a769e6dc15d527f9.tar.gz syslinux-7e301945d8a3d5b99fbac741a769e6dc15d527f9.tar.xz syslinux-7e301945d8a3d5b99fbac741a769e6dc15d527f9.zip |
hdt: Avoid memory corruption on menu summary
During CPU's capabilites computation, let's sure the buffer we manage is
big enought....
-rw-r--r-- | com32/hdt/hdt-menu-summary.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/com32/hdt/hdt-menu-summary.c b/com32/hdt/hdt-menu-summary.c index ad87c299..cef7e69e 100644 --- a/com32/hdt/hdt-menu-summary.c +++ b/com32/hdt/hdt-menu-summary.c @@ -52,8 +52,7 @@ void compute_summarymenu(struct s_my_menu *menu, struct s_hardware *hardware) add_item(buffer, statbuffer, OPT_INACTIVE, NULL, 0); menu->items_count++; - char features[SUBMENULEN + 1]; - memset(features, 0, sizeof(features)); + char features[255]={0}; if (hardware->dmi.processor.thread_count != 0) sprintf(buffer, ", %d thread", hardware->dmi.processor.thread_count); else |