diff options
author | Matt Fleming <matt.fleming@intel.com> | 2013-01-23 13:40:24 +0000 |
---|---|---|
committer | Matt Fleming <matt.fleming@intel.com> | 2013-01-23 15:05:28 +0000 |
commit | 4027dbf9df88e3feaa3744c6622e4ae7cf8ecd6e (patch) | |
tree | 63669275f07fe58b26669b2f504a3a7ba5f44475 /com32/lib/sys/module/elf_module.c | |
parent | cd079794e8908b9402840cde322bbd32ae08523c (diff) | |
download | syslinux-4027dbf9df88e3feaa3744c6622e4ae7cf8ecd6e.tar.gz syslinux-4027dbf9df88e3feaa3744c6622e4ae7cf8ecd6e.tar.xz syslinux-4027dbf9df88e3feaa3744c6622e4ae7cf8ecd6e.zip |
module: Check for NULL ctors and dtors
Don't dereference a NULL ctor/dtor as that can cause us to crash.
Signed-off-by: Matt Fleming <matt.fleming@intel.com>
Diffstat (limited to 'com32/lib/sys/module/elf_module.c')
-rw-r--r-- | com32/lib/sys/module/elf_module.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/com32/lib/sys/module/elf_module.c b/com32/lib/sys/module/elf_module.c index c4e9d410..e61480f5 100644 --- a/com32/lib/sys/module/elf_module.c +++ b/com32/lib/sys/module/elf_module.c @@ -604,7 +604,7 @@ int module_load(struct elf_module *module) { (module->exit_func == NULL) ? NULL : *(module->exit_func)); */ - for (ctor = module->ctors; *ctor; ctor++) + for (ctor = module->ctors; ctor && *ctor; ctor++) (*ctor) (); return 0; |