Fix issue #25: - Omit SCRIPT_VALUE_TYPE_NULL entries with no key name

This commit is contained in:
Bartosz J 2014-09-27 18:13:03 +02:00 committed by Alejandro Mery
parent 22a07bc383
commit dfece178b7

View File

@ -290,8 +290,11 @@ static int decompile_section(void *bin, size_t bin_size,
goto malloc_error;
}; break;
case SCRIPT_VALUE_TYPE_NULL:
if (!script_null_entry_new(s, entry->name))
if (!*entry->name) {
pr_err("%s: empty entry in section: %s\n", filename, section->name);
} else if (!script_null_entry_new(s, entry->name)) {
goto malloc_error;
}
break;
default:
pr_err("%s: %s.%s: unknown type %d\n",