aboutsummaryrefslogtreecommitdiffstats
path: root/com32/hdt/hdt-cli-disk.c
diff options
context:
space:
mode:
authorPierre-Alexandre Meyer <pierre@mouraf.org>2009-11-18 20:15:55 -0800
committerPierre-Alexandre Meyer <pierre@mouraf.org>2009-11-18 20:15:55 -0800
commit1682c7e3b73c00727ddf4a5792633bded9d37e0e (patch)
tree6807d25e21d4c13dc02010fe618dae9f29cb1ea6 /com32/hdt/hdt-cli-disk.c
parent937dfc4e294cffff792d6f126efd6ff8b8480742 (diff)
downloadhdt-1682c7e3b73c00727ddf4a5792633bded9d37e0e.tar.gz
hdt-1682c7e3b73c00727ddf4a5792633bded9d37e0e.tar.xz
hdt-1682c7e3b73c00727ddf4a5792633bded9d37e0e.zip
hdt: more memory corruption fixes
A cli_module_descr can be defined with no modules (only a default callback). Cf. the syslinux module for instance. This patch adds a check for NULL structures before trying to dereference them. Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
Diffstat (limited to 'com32/hdt/hdt-cli-disk.c')
-rw-r--r--com32/hdt/hdt-cli-disk.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/com32/hdt/hdt-cli-disk.c b/com32/hdt/hdt-cli-disk.c
index 7f6b00db..c83c220e 100644
--- a/com32/hdt/hdt-cli-disk.c
+++ b/com32/hdt/hdt-cli-disk.c
@@ -224,7 +224,6 @@ struct cli_callback_descr list_disk_show_modules[] = {
},
};
-
struct cli_module_descr disk_show_modules = {
.modules = list_disk_show_modules,
.default_callback = disks_summary,