mirror of
https://github.com/limine-bootloader/limine
synced 2024-11-23 17:09:40 +03:00
menu: Fix 2 uncaught NULL derefs
This commit is contained in:
parent
d454935ec6
commit
cac57ced41
@ -180,11 +180,17 @@ char *config_entry_editor(const char *title, const char *orig_entry) {
|
||||
|
||||
bool syntax_highlighting_enabled = true;
|
||||
char *syntax_highlighting_enabled_config = config_get_value(NULL, 0, "EDITOR_HIGHLIGHTING");
|
||||
if (!strcmp(syntax_highlighting_enabled_config, "no")) syntax_highlighting_enabled = false;
|
||||
if (syntax_highlighting_enabled_config != NULL
|
||||
&& strcmp(syntax_highlighting_enabled_config, "no") == 0) {
|
||||
syntax_highlighting_enabled = false;
|
||||
}
|
||||
|
||||
validation_enabled = true;
|
||||
char *validation_enabled_config = config_get_value(NULL, 0, "EDITOR_VALIDATION");
|
||||
if (!strcmp(validation_enabled_config, "no")) validation_enabled = false;
|
||||
if (validation_enabled_config != NULL
|
||||
&& strcmp(validation_enabled_config, "no") == 0) {
|
||||
validation_enabled = false;
|
||||
}
|
||||
|
||||
char *buffer = ext_mem_alloc(EDITOR_MAX_BUFFER_SIZE);
|
||||
memcpy(buffer, orig_entry, entry_size);
|
||||
|
Loading…
Reference in New Issue
Block a user